update installer to match fs needs
parent
9d43eb376e
commit
7ff1b390c8
25
install.sh
25
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"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue