changed gitpath to be relative to install file, not cwd

This commit is contained in:
siaal
2022-10-25 04:34:00 +10:00
parent 6f8072cb00
commit 76d8e86799

View File

@@ -7,7 +7,7 @@ GREEN='\e[32m'
checkEnv(){
## Check if the current directory is writable.
GITPATH=$(pwd)
GITPATH="$(dirname "$(realpath "$0")")"
if [[ ! -w ${GITPATH} ]];then
echo -e "${RED}Can't write to ${GITPATH}${RC}"
exit 1