diff --git a/bootstrap.sh b/bootstrap.sh index 931d432..a681d42 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -146,10 +146,14 @@ create_directories() { _loop_wrapper "${SCRIPT_DIR}/directories.txt" \ 'Creating directory $(echo $x | cut -d"," -f1)' \ ' + set -e dir=$(echo $x | cut -d"," -f1) mod=$(echo $x | cut -d"," -f2) + [ "$dir" = "$mod" ] && mod="755" + [ -d "${user_home}/${dir}" ] || mkdir -p "${user_home}/${dir}" sudo -u "$username" mkdir -p "${user_home}/${dir}" chmod "${mod}" "${user_home}/${dir}" + set +e ' info "Done!" }