Install all specified tools on one line for homebrew formula

This commit is contained in:
Alex Epstein 2017-07-31 21:14:18 -04:00
parent a32747298c
commit 2b0d1cf653
1 changed files with 4 additions and 2 deletions

View File

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