update installer to match fs needs

pull/301/head
Maxim Kovgan 2014-08-11 12:25:10 +03:00
parent 9d43eb376e
commit 7ff1b390c8
1 changed files with 24 additions and 1 deletions

View File

@ -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"