From 0920493634c08136af3ff75e9e1982c9cc966c64 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 25 Oct 2025 15:46:52 -0700 Subject: [PATCH] Create the config directory so that tee can create the files. --- setup.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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