From 03e537b56e956924270d3dca2cac9b7cc1aadab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20R=C4=B1za=20KESK=C4=B0N?= Date: Sat, 31 Jul 2021 20:45:59 +0300 Subject: [PATCH] fix directory create --- scripts/sulinstrapt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/sulinstrapt b/scripts/sulinstrapt index f4ce5e2c..a8af0b85 100644 --- a/scripts/sulinstrapt +++ b/scripts/sulinstrapt @@ -39,13 +39,14 @@ elif [[ $UID -ne 0 ]] ; then echo "You must be root!" exit 1 fi -if [[ -d "$sulin" ]] ; then - echo "$sulin already exist" +if [[ -d "$1" ]] ; then + echo "$1 already exist" exit 1 -elif [[ -f "$sulin" ]] ; then - echo "$sulin is a file. You must delete or move." +elif [[ -f "$1" ]] ; then + echo "$1 is a file. You must delete or move." exit 1 fi +mkdir -p "$1" while getopts -- ':r' OPTION; do if [[ "$OPTION" == "r" ]] ; then -- 2.18.1