From e92dbe8aa468397521b92aad379fecccd2c91b0b Mon Sep 17 00:00:00 2001 From: Alex Epstein Date: Tue, 1 Aug 2017 21:16:27 -0400 Subject: [PATCH] Fixing manpath location for linuxbrew --- install.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 7c596db..85e2dfc 100755 --- a/install.sh +++ b/install.sh @@ -63,11 +63,8 @@ singleInstall() copyManpage() { - if [[ "$(uname)" == "Darwin" ]]; then - manPath="$prefix/share/man/man1" - else - manPath="$prefix/man/man1" - fi + manPath="$prefix/share/man/man1" + if [ -f "$prefix/man/man1/bash-snippets.1" ]; then rm -f "$prefix/man/man1/bash-snippets.1"; fi cp bash-snippets.1 $manPath 2>&1 || { echo "Failure"; echo "Error copying file, try running install script as sudo"; exit 1; } } @@ -75,8 +72,7 @@ response=$( echo "$@" | grep -Eo "\-\-prefix") if [[ $response == "--prefix" ]]; then prefix=$(echo -n "$@" | sed -e 's/--prefix=\(.*\) .*/\1/' | cut -d " " -f 1) - if [[ "$(uname)" == "Darwin" ]]; then mkdir -p $prefix/bin $prefix/share/man/man1 - else mkdir -p $prefix/bin $prefix/man/man1; fi + mkdir -p $prefix/bin $prefix/share/man/man1 if [[ $2 == "all" ]];then for tool in "${tools[@]}"; do singleInstall $tool || exit 1