From aa39ece45a91eb069e997b62e900fa16d356e8e1 Mon Sep 17 00:00:00 2001 From: "Fred T. Hamster" Date: Wed, 1 Nov 2023 16:42:30 -0400 Subject: [PATCH] updated to use FEISTY_MEOW_SCAN_REPOS variable instead of FEISTY_MEOW_APPS_DIR variable, which is annoyingly conflicted. the scan repos is currently single value, but we need to support multi value in the future. --- scripts/core/variables.sh | 17 +++++++++-------- scripts/site_avenger/config/default.app | 3 ++- scripts/site_avenger/revamp_cakelampvm_v002.sh | 6 ++++-- scripts/system/add_apache_site.sh | 3 ++- scripts/system/remove_apache_site.sh | 3 ++- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index 5cc90f3e..98045017 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -240,22 +240,23 @@ define_yeti_variable DEFAULT_FEISTYMEOW_ORG_DIR=/opt/feistymeow.org fi # add in any folders that are under the feisty meow applications folder. - define_yeti_variable FEISTY_MEOW_APPS_DIR - if [ -z "$FEISTY_MEOW_APPS_DIR" ]; then + define_yeti_variable FEISTY_MEOW_SCAN_REPOS + if [ -z "$FEISTY_MEOW_SCAN_REPOS" ]; then if [ -d "$HOME/apps" ]; then - define_yeti_variable FEISTY_MEOW_APPS_DIR="$HOME/apps" + define_yeti_variable FEISTY_MEOW_SCAN_REPOS="$HOME/apps" else -# echo "No value set for FEISTY_MEOW_APPS_DIR and no default apps folder found in home." +# echo "No value set for FEISTY_MEOW_SCAN_REPOS and no default apps folder found in home." true fi fi - if [ -d "$FEISTY_MEOW_APPS_DIR" ]; then + if [ -d "$FEISTY_MEOW_SCAN_REPOS" ]; then +#hmmm: handle the repos as if they are multi value!!! # general search for normal project folders in apps. - REPOSITORY_LIST+="$(find "$FEISTY_MEOW_APPS_DIR" -maxdepth 2 -mindepth 2 -iname ".git" -type d -exec dirname {} ';') " - REPOSITORY_LIST+="$(find "$FEISTY_MEOW_APPS_DIR" -maxdepth 2 -mindepth 2 -iname ".svn" -type d -exec dirname {} ';') " + REPOSITORY_LIST+="$(find "$FEISTY_MEOW_SCAN_REPOS" -maxdepth 2 -mindepth 2 -iname ".git" -type d -exec dirname {} ';') " + REPOSITORY_LIST+="$(find "$FEISTY_MEOW_SCAN_REPOS" -maxdepth 2 -mindepth 2 -iname ".svn" -type d -exec dirname {} ';') " # special search for site avenger directories; they have avenger5 as second level. - REPOSITORY_LIST+="$(find "$FEISTY_MEOW_APPS_DIR" -maxdepth 2 -mindepth 2 -iname "avenger5" -type d) " + REPOSITORY_LIST+="$(find "$FEISTY_MEOW_SCAN_REPOS" -maxdepth 2 -mindepth 2 -iname "avenger5" -type d) " fi # the archive list is a set of directories that are major repositories of diff --git a/scripts/site_avenger/config/default.app b/scripts/site_avenger/config/default.app index 8ec6ddc2..6a2d9a26 100644 --- a/scripts/site_avenger/config/default.app +++ b/scripts/site_avenger/config/default.app @@ -13,7 +13,8 @@ # the top level of the user's application storage. if [ -z "$BASE_APPLICATION_PATH" ]; then - export BASE_APPLICATION_PATH="$FEISTY_MEOW_APPS_DIR" + export BASE_APPLICATION_PATH="$FEISTY_MEOW_SCAN_REPOS" +#hmmm: fix for multivalue usage! fi # where the code should come from. if [ -z "$DEFAULT_REPOSITORY_ROOT" ]; then diff --git a/scripts/site_avenger/revamp_cakelampvm_v002.sh b/scripts/site_avenger/revamp_cakelampvm_v002.sh index 93d0302c..7d50a057 100644 --- a/scripts/site_avenger/revamp_cakelampvm_v002.sh +++ b/scripts/site_avenger/revamp_cakelampvm_v002.sh @@ -112,8 +112,10 @@ exit_on_error "group perms on feisty meow" # fix perms for fred user. chown -R fred:fred /home/fred /home/archives/stuffing /home/fred/.[a-zA-Z0-9]* exit_on_error "chown fred home" -if [ -d "$FEISTY_MEOW_APPS_DIR" ]; then - group_perm $FEISTY_MEOW_APPS_DIR + +#hmmm: argh, wrong check! can't check a multi-value if it's a directory or not!!! +if [ -d "$FEISTY_MEOW_SCAN_REPOS" ]; then + group_perm $FEISTY_MEOW_SCAN_REPOS exit_on_error "group perms on fred's apps" fi harsh_perm /home/fred/.ssh diff --git a/scripts/system/add_apache_site.sh b/scripts/system/add_apache_site.sh index ad94e2f9..b3703ae0 100644 --- a/scripts/system/add_apache_site.sh +++ b/scripts/system/add_apache_site.sh @@ -12,7 +12,8 @@ source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh" # some convenient defaults for our current usage. if [ -z "$BASE_APPLICATION_PATH" ]; then - BASE_APPLICATION_PATH="$FEISTY_MEOW_APPS_DIR" + BASE_APPLICATION_PATH="$FEISTY_MEOW_SCAN_REPOS" +#hmmm: take just first item from the repos list! fi if [ -z "$STORAGE_SUFFIX" ]; then STORAGE_SUFFIX="/public" diff --git a/scripts/system/remove_apache_site.sh b/scripts/system/remove_apache_site.sh index 01568460..9e21fa31 100644 --- a/scripts/system/remove_apache_site.sh +++ b/scripts/system/remove_apache_site.sh @@ -12,7 +12,8 @@ source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh" # some convenient defaults for our current usage. if [ -z "$BASE_APPLICATION_PATH" ]; then - BASE_APPLICATION_PATH="$FEISTY_MEOW_APPS_DIR" + BASE_APPLICATION_PATH="$FEISTY_MEOW_SCAN_REPOS" +#hmmm: take just first item! fi if [ -z "$STORAGE_SUFFIX" ]; then STORAGE_SUFFIX="/public" -- 2.34.1