aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-08-22 14:07:44 +0300
committerkaotisk <kaotisk@arching-kaos.org>2023-08-22 14:07:44 +0300
commit5c6b610e905702074c80ce00b649b07df682fee6 (patch)
treeb7c68ed9b2d631362d98928f4a5cb5383207f660
parent2e76a77d92bfc5640b942f3b3a297d5cb079e94d (diff)
downloadarching-kaos-tools-5c6b610e905702074c80ce00b649b07df682fee6.tar.gz
arching-kaos-tools-5c6b610e905702074c80ce00b649b07df682fee6.tar.bz2
arching-kaos-tools-5c6b610e905702074c80ce00b649b07df682fee6.zip
Aborts installation if AK_WORKDIR is found.
-rwxr-xr-xinstall.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/install.sh b/install.sh
index 40cc19c..3e77d3e 100755
--- a/install.sh
+++ b/install.sh
@@ -97,7 +97,16 @@ fi
source ./config.sh
printf "%s" $(pwd) > wam
WHEREAMI="$(cat wam)"
-if [ ! -d $AK_WORKDIR ] ; then mkdir $AK_WORKDIR ;fi
+if [ ! -d $AK_WORKDIR ]
+then
+ mkdir $AK_WORKDIR
+else
+ printf "Error: Found %s.\n" "$AK_WORKDIR"
+ printf "Please back up your previous installation\n"
+ printf "and rerun ./install.sh.\n"
+ exit 5
+fi
+
if [ ! -d $AK_CONFIGDIR ] ; then mkdir $AK_CONFIGDIR ;fi
if [ ! -d $AK_BINDIR ]; then mkdir $AK_BINDIR ;fi
if [ ! -d $AK_ZBLOCKDIR ]; then mkdir $AK_ZBLOCKDIR ;fi