From ba2a737cceced2355f10e2f645e6794762858d12 Mon Sep 17 00:00:00 2001 From: Speculative Moonstone <167392122+speculativemoonstone@users.noreply.github.com> Date: Thu, 18 Apr 2024 04:25:32 +0000 Subject: [PATCH] Allow webui.sh to be runnable from directories containing a .git file --- webui.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webui.sh b/webui.sh index d28c7c19b..c22a68227 100755 --- a/webui.sh +++ b/webui.sh @@ -113,13 +113,13 @@ then exit 1 fi -if [[ -d .git ]] +if [[ -d "$SCRIPT_DIR/.git" ]] then printf "\n%s\n" "${delimiter}" printf "Repo already cloned, using it as install directory" printf "\n%s\n" "${delimiter}" - install_dir="${PWD}/../" - clone_dir="${PWD##*/}" + install_dir="${SCRIPT_DIR}/../" + clone_dir="${SCRIPT_DIR##*/}" fi # Check prerequisites