Permalink
Browse files

Merge pull request #135 from nofeet/master

Fix for install.sh for partial installations
  • Loading branch information...
2 parents 54680bd + 7632649 commit 5ce89711166dfa977bb8d3bf41534021ad689b55 @tswicegood tswicegood committed May 17, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 install.sh
View
7 install.sh
@@ -36,18 +36,19 @@ function load_all() {
function load_some() {
file_type=$1
- for file in `ls $BASH_IT/${file_type}/available/[^_]*`
+ for path in `ls $BASH_IT/${file_type}/available/[^_]*`
do
if [ ! -d "$BASH_IT/$file_type/enabled" ]
then
mkdir "$BASH_IT/$file_type/enabled"
fi
+ file_name=$(basename "$path")
while true
do
- read -p "Would you like to enable the ${file%.*.*} $file_type? [Y/N] " RESP
+ read -p "Would you like to enable the ${file_name%%.*} $file_type? [Y/N] " RESP
case $RESP in
[yY])
- ln -s "$BASH_IT/$file_type/available/$file" "$BASH_IT/$file_type/enabled"
+ ln -s "$path" "$BASH_IT/$file_type/enabled"
break
;;
[nN])

0 comments on commit 5ce8971

Please sign in to comment.