diff --git a/init.sh b/init.sh index 6640f91..96bbb6b 100755 --- a/init.sh +++ b/init.sh @@ -156,16 +156,16 @@ process_conf_file (){ create_dir(){ # $1 directory to create -if [ ! -d $1 ] -then - mkdir -p $1 -else - if [[ $2 == 1 ]] - then - rm -rf $1 - create_dir $1 + if [ ! -d "$1" ] + then + mkdir -p "$1" + else + if [ "$2" -eq 1 ] + then + rm -rf "$1" + create_dir "$1" + fi fi -fi } # unmount if device is mounted