Replace $BASH with $BASH_IT because $BASH is already used on *nix systems for the pathname to the executable (http://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#Bash-Variables)

This commit is contained in:
John Schulz
2011-09-20 11:07:48 -04:00
parent 11214382c5
commit 323ce20a2d
4 changed files with 22 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
BASH="$HOME/.bash_it"
BASH_IT="$HOME/.bash_it"
cp $HOME/.bash_profile $HOME/.bash_profile.bak
@@ -30,24 +30,24 @@ done
function load_all() {
file_type=$1
[ ! -d "$BASH/$file_type/enabled" ] && mkdir "$BASH/${file_type}/enabled"
ln -s $BASH/${file_type}/available/* "${BASH}/${file_type}/enabled"
[ ! -d "$BASH_IT/$file_type/enabled" ] && mkdir "$BASH_IT/${file_type}/enabled"
ln -s $BASH_IT/${file_type}/available/* "${BASH_IT}/${file_type}/enabled"
}
function load_some() {
file_type=$1
for file in `ls $BASH/${file_type}/available`
for file in `ls $BASH_IT/${file_type}/available`
do
if [ ! -d "$BASH/$file_type/enabled" ]
if [ ! -d "$BASH_IT/$file_type/enabled" ]
then
mkdir "$BASH/$file_type/enabled"
mkdir "$BASH_IT/$file_type/enabled"
fi
while true
do
read -p "Would you like to enable the ${file%.*.*} $file_type? [Y/N] " RESP
case $RESP in
[yY])
ln -s "$BASH/$file_type/available/$file" "$BASH/$file_type/enabled"
ln -s "$BASH_IT/$file_type/available/$file" "$BASH_IT/$file_type/enabled"
break
;;
[nN])