From 5c6b610e905702074c80ce00b649b07df682fee6 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Tue, 22 Aug 2023 14:07:44 +0300 Subject: Aborts installation if AK_WORKDIR is found. --- install.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3