Compressing if statement in install to be more readable

This commit is contained in:
Alex Epstein 2017-07-17 14:21:26 -04:00
parent eaf7830533
commit 6f3b15457c
1 changed files with 3 additions and 6 deletions

View File

@ -41,12 +41,9 @@ singleInstall()
copyManpage() copyManpage()
{ {
if [[ "$(uname)" == "Darwin" ]]; then if [[ "$(uname)" == "Darwin" ]]; then manPath="/usr/local/share/man/man1"
manPath="/usr/local/share/man/man1" else manPath="/usr/local/man/man1" ;fi
else cp bash-snippets.1 $manPath 2>&1 || { echo "Failure"; echo "Error copying file, try running install script as sudo"; exit 1; }
manPath="/usr/local/man/man1"
fi
cp bash-snippets.1 $manPath 2>&1 || { echo "Failure"; echo "Error copying file, try running install script as sudo"; exit 1; }
} }
if [[ $# == 0 ]]; then if [[ $# == 0 ]]; then