diff --git a/install.sh b/install.sh index 3fc0cd4..372acb5 100755 --- a/install.sh +++ b/install.sh @@ -74,14 +74,16 @@ copyManpage() response=$( echo "$@" | grep -Eo "\-\-prefix") if [[ $response == "--prefix" ]]; then - prefix=$(echo -n "$@" | sed -e 's/--prefix=\(.*\) .*/\1/') + prefix=$(echo -n "$@" | sed -e 's/--prefix=\(.*\) .*/\1/' | grep -Eo "^[a-z/A-Z=]*") mkdir -p $prefix/bin $prefix/share/man/man1 if [[ $2 == "all" ]];then for tool in "${tools[@]}"; do singleInstall $tool || exit 1 done else - singleInstall $2 || exit 1 + for tool in "${@:2}"; do + singleInstall $tool || exit 1 + done fi copyManpage || exit 1 elif [[ $# == 0 ]]; then