mirror of
https://github.com/alexanderepstein/Bash-Snippets
synced 2018-11-08 02:59:35 +01:00
Fixing manpath location for linuxbrew
This commit is contained in:
parent
99b5485f0b
commit
e92dbe8aa4
10
install.sh
10
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
|
||||
|
Loading…
Reference in New Issue
Block a user