diff --git a/setup.sh b/setup.sh index 3f7345f..57f312d 100755 --- a/setup.sh +++ b/setup.sh @@ -9,9 +9,10 @@ LOCAL=$DIR/local.yml URL="https://git.hyperling.com/me/env-ansible" BRANCH="main" -general_config="/usr/local/etc/hyperling-scm/general.ini" -workstation_config="/usr/local/etc/hyperling-scm/workstation.ini" -server_config="/usr/local/etc/hyperling-scm/server.ini" +config_dir="/usr/local/etc/hyperling-scm" +general_config="$config_dir/general.ini" +workstation_config="$config_dir/workstation.ini" +server_config="$config_dir/server.ini" ## Functions ## @@ -129,6 +130,12 @@ echo "Installed!" #echo "Added!" # Create basic layouts if configs do not exist and are requested. +if [[ -n "$create_general" + || -n "$create_workstation" + || -n "$create_server" ]] +then + sudo mkdir -pv "$config_dir" +fi if [[ -n "$create_general" && ! -f "$general_config" ]]; then function print_general_contents { cat <<- EOF