From 7ff1b390c89718e6ec1bef9c3384ac1bbb5118e9 Mon Sep 17 00:00:00 2001 From: Maxim Kovgan Date: Mon, 11 Aug 2014 12:25:10 +0300 Subject: [PATCH] update installer to match fs needs --- install.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f255655a..de9e2261 100755 --- a/install.sh +++ b/install.sh @@ -9,7 +9,30 @@ test -w $HOME/.bash_profile && cp $HOME/.bash_profile $HOME/.bash_profile.bak && echo "Your original .bash_profile has been backed up to .bash_profile.bak" -cp $HOME/.bash_it/template/bash_profile.template.bash $HOME/.bash_profile +cp $HOME/.bash_it/template/bash_profile_bashit.template.bash $HOME/.bash_profile_bashit +cat >> $HOME/.bash_profile << EOF + + +### fortscale bashit customizations +bashit() { + case \$1 in + on) + source \${HOME}/.bash_profile_bashit + ;; + off) + set | grep BASH_IT | awk '{ print "unset", \$1}' | cut -d= -f1 | while read -r line + do + \$line + done + source /etc/profile + ;; + *) + echo "Unknown parameter: \$1, Usage: bashit [on|off]" + ;; + esac +} + +EOF echo "Copied the template .bash_profile into ~/.bash_profile, edit this file to customize bash-it"