Fix installer

This commit is contained in:
2021-10-22 18:07:04 -04:00
parent 75c2479dc1
commit 902a3cc5c4

View File

@@ -5,20 +5,22 @@
parent="${BASH_SOURCE[0]}" parent="${BASH_SOURCE[0]}"
parent=${parent%/*} parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1 [[ -f functions ]] && . functions || exit 1
is_root is_root
#git rev-parse --is-inside-git-dir || echo "You must execute this script from the hartmanlab git directory" && exit 1 source="/home/bryan/shared/hartmanlab"
install -m 644 "$parent"/functions /usr/local/bin/ [[ "$PWD" != "$source" ]] && pushd "$source" || exit $?
for script in "$parent"/script-*; do install -m 644 functions /usr/local/bin/
for script in ./script-*; do
cp -u "$script" /usr/local/bin/ cp -u "$script" /usr/local/bin/
done done
# Install manual # Install manual
manual="$parent/README.html" manual="$README.html"
[[ ! -f "$manual" ]] && echo "No manual found, skipping!" && exit 1 [[ ! -f "$manual" ]] && echo "No manual found, skipping!" && exit 1
for homedir in /home/*; do for homedir in /home/*; do
@@ -29,3 +31,5 @@ for homedir in /home/*; do
ln -fs "$manual" "${homedir}/Desktop/$manual" ln -fs "$manual" "${homedir}/Desktop/$manual"
done done
popd || exit 0