refactored to make next refactoring easier
authorChris Koeritz <fred@gruntose.com>
Thu, 9 Nov 2017 21:16:17 +0000 (16:16 -0500)
committerChris Koeritz <fred@gruntose.com>
Thu, 9 Nov 2017 21:16:17 +0000 (16:16 -0500)
moved to a more cosmopolitan model for the configuration.  we will now load the site avenger config as a default if there is no config file specified.

scripts/site_avenger/avcoreup.sh
scripts/site_avenger/configs/default-site_avenger.config [new file with mode: 0644]
scripts/site_avenger/powerup.sh
scripts/site_avenger/shared_site_mgr.sh
scripts/site_avenger/site_avenger.config [deleted file]
scripts/site_avenger/sitepush.sh
scripts/site_avenger/siteup.sh

index aa4af787bc32cb6de8f44de55afae1825d3f84b4..0aeae721aa245acbf276cf504a448edf27cddfa2 100644 (file)
@@ -8,9 +8,6 @@
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 source "$WORKDIR/shared_site_mgr.sh"
 
-# get our defaults.
-source "$WORKDIR/site_avenger.config"
-
 ############################
 
 # main body of script.
diff --git a/scripts/site_avenger/configs/default-site_avenger.config b/scripts/site_avenger/configs/default-site_avenger.config
new file mode 100644 (file)
index 0000000..b5467dc
--- /dev/null
@@ -0,0 +1,8 @@
+
+# this script provides the default values for the variables used in our site management scripts.
+
+APPLICATION_DIR="$HOME/apps"
+DEFAULT_REPOSITORY_ROOT="git@github.com:kwentworth"
+CHECKOUT_DIR_NAME="avenger5"
+
+
index aa1c4425b4944d9e2e8c2078b848b5897513b12d..60c277836d3e9be2d2fd2d7a172c384161dd6bf3 100644 (file)
@@ -25,9 +25,6 @@
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 source "$WORKDIR/shared_site_mgr.sh"
 
-# get our defaults.
-source "$WORKDIR/site_avenger.config"
-
 ############################
 
 function print_instructions()
index 8b18814cd3031926177e7b298be26c80adf417fe..41b033febdc1d5140b477e1a77c3a1e14afa7737 100644 (file)
@@ -5,8 +5,20 @@
 
 # This contains a bunch of reusable functions that help out in managing websites.
 
+# This script is sourced, and relies on the value of WORKDIR, which should
+# point at the directory where the site management scripts are stored,
+# especially this one.
+
 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
 
+# get our configuration loaded.
+export SITE_MANAGEMENT_CONFIG_FILE
+if [ -z "$SITE_MANAGEMENT_CONFIG_FILE" ]; then
+  SITE_MANAGEMENT_CONFIG_FILE="$WORKDIR/configs/default-site_avenger.config"
+fi
+source "$SITE_MANAGEMENT_CONFIG_FILE"
+test_or_die "loading site management configuration from: $SITE_MANAGEMENT_CONFIG_FILE"
+
 # configure feisty revision control to ignore vendor folders.
 export NO_CHECKIN_VENDOR=true
 
diff --git a/scripts/site_avenger/site_avenger.config b/scripts/site_avenger/site_avenger.config
deleted file mode 100644 (file)
index b5467dc..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-# this script provides the default values for the variables used in our site management scripts.
-
-APPLICATION_DIR="$HOME/apps"
-DEFAULT_REPOSITORY_ROOT="git@github.com:kwentworth"
-CHECKOUT_DIR_NAME="avenger5"
-
-
index 963586925af436eb48c74226cf15d0b6ce9602a2..22574e27005aec0e3083780aa564acf659815d25 100644 (file)
@@ -8,9 +8,6 @@
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 source "$WORKDIR/shared_site_mgr.sh"
 
-# get our defaults.
-source "$WORKDIR/site_avenger.config"
-
 ############################
 
 # main body of script.
index c9b348c48fd0cee2c9fcbb30bfb6979900dd3d26..e0183dea10e2811c9702cc4d89137189c7f43bba 100644 (file)
@@ -8,9 +8,6 @@
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 source "$WORKDIR/shared_site_mgr.sh"
 
-# get our defaults.
-source "$WORKDIR/site_avenger.config"
-
 ############################
 
 # main body of script.