From 072156e50aea5cff0c813a9b61f38877311e39c8 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Wed, 13 Mar 2019 10:44:36 -0400 Subject: [PATCH] cleaning out references to avenger5 text we already have a variable for this word, so it shouldn't appear in any file except the defaults file. one allowed exception is a script that acts on all site avenger folders, since that script doesn't use the rest of the site avenger scripting machinery and it's an appropriate usage for this particular script (act on all apps). --- scripts/site_avenger/avcoreup.sh | 2 +- scripts/site_avenger/clean_mapsdemo.sh | 42 ------------------------- scripts/site_avenger/config/default.app | 5 +-- scripts/site_avenger/shared_site_mgr.sh | 8 ++--- 4 files changed, 8 insertions(+), 49 deletions(-) delete mode 100644 scripts/site_avenger/clean_mapsdemo.sh diff --git a/scripts/site_avenger/avcoreup.sh b/scripts/site_avenger/avcoreup.sh index 0c430756..437e5134 100644 --- a/scripts/site_avenger/avcoreup.sh +++ b/scripts/site_avenger/avcoreup.sh @@ -37,7 +37,7 @@ full_app_dir="$BASE_APPLICATION_PATH/$app_dirname" pushd "$full_app_dir" &>/dev/null exit_on_error "Changing to app path '$full_app_dir'" -dir="avenger5/vendor/siteavenger/avcore" +dir="$CHECKOUT_DIR_NAME/vendor/siteavenger/avcore" if [ ! -d $dir ]; then echo "The application doesn't seem to use avcore: $full_app_dir" else diff --git a/scripts/site_avenger/clean_mapsdemo.sh b/scripts/site_avenger/clean_mapsdemo.sh deleted file mode 100644 index e2c8755e..00000000 --- a/scripts/site_avenger/clean_mapsdemo.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# some code i wrote to add to revamp that turned out to be unsuitable. -# but it corrects a problem in cakelampvm v002 release that i find annoying, -# so here it is as its own file. - -# clean out some old files that were not checked in in mapsdemo. -echo Doing some git repository maintenance in fred account. -# -# change over to fred folder -pushd /home/fred -exit_on_error "changing dir to fred's home; what have you done with fred?" - -pushd apps/mapsdemo/avenger5 -exit_on_error "changing dir to mapsdemo app" - -rpuffer . &>/dev/null -if [ $? -ne 0 ]; then - # it seems our old files are still conflicting this. - if [ -f config/config_google.php ]; then - \rm -f config/config_google.php - exit_on_error "removing old config for google" - fi - if [ -f config/app.php ]; then - \rm -f config/app.php - exit_on_error "removing old config for app" - fi - - git reset --hard HEAD - exit_on_error "resetting git's hard head" - - rpuffer . -#hmmm: use output saver thing when that exists. - exit_on_error "puffing out mapsdemo app after inadequate corrective action was taken" -fi - -popd - -popd -#...coolness, if we got to here. - - diff --git a/scripts/site_avenger/config/default.app b/scripts/site_avenger/config/default.app index 9e74f0a6..e128f715 100644 --- a/scripts/site_avenger/config/default.app +++ b/scripts/site_avenger/config/default.app @@ -15,8 +15,9 @@ export BASE_APPLICATION_PATH="$HOME/apps" # where the code should come from. export DEFAULT_REPOSITORY_ROOT="git@github.com:kwentworth" -# we checkout the git repository to a directory underneath the -# app storage directory named this: +# we checkout the git repository to a directory underneath the app storage +# directory named this (see below for "this"), if that directory name is found. +# this is a saco designs infrastructure standard. export CHECKOUT_DIR_NAME="avenger5" # the subfolder that the web browser will look for the site in, # underneath the application's specific path. diff --git a/scripts/site_avenger/shared_site_mgr.sh b/scripts/site_avenger/shared_site_mgr.sh index 7921143e..300ed3e7 100644 --- a/scripts/site_avenger/shared_site_mgr.sh +++ b/scripts/site_avenger/shared_site_mgr.sh @@ -184,10 +184,10 @@ function find_app_folder() # make sure we're allowed to auto-guess the folder name from our current dir. if [ -z "$NO_AUTOMATIC_FOLDER_GUESS" ]; then - # if we can find an avenger5 directory above our current PWD, then that - # might tell us our name. - if find_named_parent_dir "avenger5"; then - # we can grab a name above the avenger5 location. let's try that. + # if we can find the special checkout directory name above our current PWD, then that + # might tell us our project name. + if find_named_parent_dir "$CHECKOUT_DIR_NAME"; then + # we can grab a name above the checkout dir name location. let's try that. app_dirname="$(basename "$(dirname $PARENT_DIR_FOUND)" )" fi else -- 2.34.1