diff --git a/script-install-manual-scripts b/script-install-manual-scripts index dc8b294a..2551fbcb 100755 --- a/script-install-manual-scripts +++ b/script-install-manual-scripts @@ -5,20 +5,22 @@ parent="${BASH_SOURCE[0]}" parent=${parent%/*} -[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1 +[[ -f functions ]] && . functions || exit 1 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/ done # Install manual -manual="$parent/README.html" +manual="$README.html" [[ ! -f "$manual" ]] && echo "No manual found, skipping!" && exit 1 for homedir in /home/*; do @@ -29,3 +31,5 @@ for homedir in /home/*; do ln -fs "$manual" "${homedir}/Desktop/$manual" done + +popd || exit 0