Allow webui.sh to be runnable from directories containing a .git file

This commit is contained in:
Speculative Moonstone 2024-04-18 04:25:32 +00:00 committed by GitHub
parent adadb4e3c7
commit ba2a737cce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,13 +113,13 @@ then
exit 1 exit 1
fi fi
if [[ -d .git ]] if [[ -d "$SCRIPT_DIR/.git" ]]
then then
printf "\n%s\n" "${delimiter}" printf "\n%s\n" "${delimiter}"
printf "Repo already cloned, using it as install directory" printf "Repo already cloned, using it as install directory"
printf "\n%s\n" "${delimiter}" printf "\n%s\n" "${delimiter}"
install_dir="${PWD}/../" install_dir="${SCRIPT_DIR}/../"
clone_dir="${PWD##*/}" clone_dir="${SCRIPT_DIR##*/}"
fi fi
# Check prerequisites # Check prerequisites