swerved off into new branch
authorChris Koeritz <fred@gruntose.com>
Thu, 9 Nov 2017 22:19:40 +0000 (17:19 -0500)
committerChris Koeritz <fred@gruntose.com>
Thu, 9 Nov 2017 22:19:40 +0000 (17:19 -0500)
now have the basics of standing up the whole app and site done.  just want to make sure i don't clobber anything, and i wanted a development branch anyway.

scripts/site_avenger/avcoreup.sh
scripts/site_avenger/config/default.app
scripts/site_avenger/powerup.sh
scripts/site_avenger/sitepush.sh
scripts/site_avenger/siteup.sh
scripts/site_avenger/standup.sh

index 6462dea20f0faf3e2a8948a3adbe59ebb00fe3e0..f759494973e4b686b50d8d61807810e89869dfef 100644 (file)
@@ -7,8 +7,6 @@
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-source "$WORKDIR/shared_site_mgr.sh"
-
 ############################
 
 # main body of script.
@@ -16,6 +14,8 @@ source "$WORKDIR/shared_site_mgr.sh"
 # check for parameters.
 app_dirname="$1"; shift
 
+source "$WORKDIR/shared_site_mgr.sh"
+
 sep
 
 check_application_dir "$APPLICATION_DIR"
index 4036883e48a8fb4eb68222fe33bbe2d847c8e2a7..65e782d7b02664a3a08cf7cbf340d564b0a680e7 100644 (file)
@@ -23,14 +23,22 @@ CHECKOUT_DIR_NAME="avenger5"
 
 # deployment information for the application / site.
 
-APPLICATION_NAME="$(basename "$SITE_MANAGEMENT_CONFIG_FILE" .app)"
+APPLICATION_NAME="${app_dirname}"
 
 echo app name was computed as $APPLICATION_NAME
 
 # change this if the site is on the "real" internet.
-DOMAIN_NAME="$(basename "$SITE_MANAGEMENT_CONFIG_FILE" .app).vm"
+DOMAIN_NAME="${app_dirname}.vm"
 
 echo domain name was computed as $DOMAIN_NAME
 
+REPO_NAME="${app_dirname}.git"
+
+echo repo name was computed as $REPO_NAME
+
+THEME_NAME="$(capitalize_first_char "${app_dirname}.git")"
+
+echo theme name was computed as $THEME_NAME
+
 ####
 
index a72e06f19ec982ff5f86d57fbbb499283c2fd922..998fcad57b4aae9517737ab6ea75bacb654b186e 100644 (file)
@@ -22,8 +22,6 @@
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-source "$WORKDIR/shared_site_mgr.sh"
-
 ############################
 
 function print_instructions()
@@ -53,6 +51,8 @@ if [ "$app_dirname" == "-help" -o "$app_dirname" == "--help" ]; then
   print_instructions
 fi
 
+source "$WORKDIR/shared_site_mgr.sh"
+
 sep
 
 check_application_dir "$APPLICATION_DIR"
index b2a7de2dd5f69d96e8b1c945a70493b5fa0aaf5a..79156ea2ac76bb02e1ea1c28e2c0748321a4d552 100644 (file)
@@ -7,8 +7,6 @@
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-source "$WORKDIR/shared_site_mgr.sh"
-
 ############################
 
 # main body of script.
@@ -17,6 +15,8 @@ source "$WORKDIR/shared_site_mgr.sh"
 app_dirname="$1"; shift
 repo_name="$1"; shift
 
+source "$WORKDIR/shared_site_mgr.sh"
+
 sep
 
 check_application_dir "$APPLICATION_DIR"
index 826d7d03370a408ba25b1b918adc4251a738d02c..a63744be2ee02355999c770401ca0c74a3932ded 100644 (file)
@@ -7,8 +7,6 @@
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-source "$WORKDIR/shared_site_mgr.sh"
-
 ############################
 
 # main body of script.
@@ -17,6 +15,8 @@ source "$WORKDIR/shared_site_mgr.sh"
 app_dirname="$1"; shift
 repo_name="$1"; shift
 
+source "$WORKDIR/shared_site_mgr.sh"
+
 sep
 
 check_application_dir "$APPLICATION_DIR"
index 3bb327f20f87f61ccca2807e3ec0c9107fa084ff..762bd1ef6e8ba20e26e171fa99f7c6757fecbb66 100644 (file)
@@ -8,8 +8,6 @@
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-source "$WORKDIR/shared_site_mgr.sh"
-
 ############################
 
 function print_instructions()
@@ -32,8 +30,12 @@ overridden by setting the SITE_MANAGEMENT_CONFIG_FILE environment variable."
 
 # check for parameters.
 app_dirname="$1"; shift
-repo_name="$1"; shift
-theme_name="$1"; shift
+
+if [ -z "$app_dirname" ]; then
+  print_instructions
+fi
+
+source "$WORKDIR/shared_site_mgr.sh"
 
 if [ "$app_dirname" == "-help" -o "$app_dirname" == "--help" ]; then
   print_instructions
@@ -43,6 +45,47 @@ sep
 
 check_application_dir "$APPLICATION_DIR"
 
+add_domain "$DOMAIN_NAME"
+test_or_die "Setting up domain: $DOMAIN_NAME"
+
+add_apache_site "$APPLICATION_NAME" "$DOMAIN_NAME"
+test_or_die "Setting up apache site for: $APPLICATION_NAME"
+
+powerup "$APPLICATION_NAME" "$REPO_NAME" "$THEME_NAME"
+
+
+
+
+
+sep
+
+echo "
+Finished standing up the full domain and site in:
+${app_dirname}"
+
+#leave before old crud below
+exit 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#below is probably not needed.
 # find proper webroot where the site will be initialized.
 if [ -z "$app_dirname" ]; then
   # no dir was passed, so guess it.