From: Chris Koeritz Date: Sun, 5 Nov 2017 00:57:44 +0000 (-0400) Subject: adopted two new variables X-Git-Tag: 2.140.90~76 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=f6066f2fa1be664694756f980e25f3d0a4b8228b adopted two new variables SHELL_DEBUG => DEBUG_FEISTY_MEOW GENERATED_STORE => FEISTY_MEOW_GENERATED_STORE --- diff --git a/examples/bashisms/dot.bash_logout b/examples/bashisms/dot.bash_logout index ad844bea..ab2ba32b 100644 --- a/examples/bashisms/dot.bash_logout +++ b/examples/bashisms/dot.bash_logout @@ -1,6 +1,6 @@ # runs the nechung oracle program at exit from bash. sep 79 -$GENERATED_STORE/runtime/binaries/nechung +$FEISTY_MEOW_GENERATED_STORE/runtime/binaries/nechung echo diff --git a/feisty_inits/dot.bashrc-normal-user b/feisty_inits/dot.bashrc-normal-user index 793e4841..aace71cf 100644 --- a/feisty_inits/dot.bashrc-normal-user +++ b/feisty_inits/dot.bashrc-normal-user @@ -25,7 +25,7 @@ if [ "${TERM}" != "dumb" -a -z "$PBS_ENVIRONMENT" ]; then export RUN_ALL_TESTS=true # turns on noisy debugging in feisty meow scripts if uncommented. - #export SHELL_DEBUG=true + #export DEBUG_FEISTY_MEOW=true fi ############## diff --git a/nucleus/library/tests_filesystem/test_directory_tree.cpp b/nucleus/library/tests_filesystem/test_directory_tree.cpp index 77b32a37..5e9fe6b3 100644 --- a/nucleus/library/tests_filesystem/test_directory_tree.cpp +++ b/nucleus/library/tests_filesystem/test_directory_tree.cpp @@ -197,7 +197,7 @@ LOG(diffs.text_form()); LOG("reading tree to recreate"); directory_tree dir(path, pattern.s()); ASSERT_TRUE(dir.good(), "makedirs test directory reading"); - filename tmpdir(environment::get("GENERATED_STORE") + "/zz_balfazzaral"); + filename tmpdir(environment::get("FEISTY_MEOW_GENERATED_STORE") + "/zz_balfazzaral"); LOG(astring("will write to tmp in ") + tmpdir); basis::outcome result = dir.make_directories(tmpdir.raw()); ASSERT_EQUAL(result.value(), common::OKAY, "makedirs should succeed"); diff --git a/production/paths.ini b/production/paths.ini index c9ee4edc..0f274370 100644 --- a/production/paths.ini +++ b/production/paths.ini @@ -1,3 +1,3 @@ [Common] -LogPath=$GENERATED_STORE/logs +LogPath=$FEISTY_MEOW_GENERATED_STORE/logs diff --git a/scripts/clam/variables.def b/scripts/clam/variables.def index 100fe6be..809f79e5 100644 --- a/scripts/clam/variables.def +++ b/scripts/clam/variables.def @@ -198,7 +198,7 @@ export CLEAN # sets the temporary directory. export CLAM_TMP ifeq "$(CLAM_TMP)" "" - CLAM_TMP := $(GENERATED_STORE)/clam_tmp + CLAM_TMP := $(FEISTY_MEOW_GENERATED_STORE)/clam_tmp endif #turned off for the moment, since this seems like a bad idea; we define clam tmp in terms of tmp sometimes, do not we??? diff --git a/scripts/core/common.alias b/scripts/core/common.alias index 1a70699e..bb3f4a5a 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -104,9 +104,9 @@ define_yeti_alias why='echo We all wonder what the point of the universe is at t # call the generated aliases file, if it exists. if [ -f "$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh" ]; then - if [ ! -z "$SHELL_DEBUG" ]; then echo loading script aliases...; fi + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo loading script aliases...; fi source "$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh" - if [ ! -z "$SHELL_DEBUG" ]; then echo done loading script aliases.; fi + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo done loading script aliases.; fi fi ############## diff --git a/scripts/core/create_tempdir.sh b/scripts/core/create_tempdir.sh index e4fd53d6..6dbd31c3 100644 --- a/scripts/core/create_tempdir.sh +++ b/scripts/core/create_tempdir.sh @@ -5,7 +5,7 @@ # This creates a temporary directory for transient files if such a directory # does not already exist. -if [ ! -z "$SHELL_DEBUG" ]; then echo creating temporary directory...; fi +if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo creating temporary directory...; fi if [ -z "$TMP" ]; then # main declaration of the transients area. @@ -34,5 +34,5 @@ export TEMP=$TMP # Make sure no one else is playing around in the temporary directory. chmod 700 $TMP -if [ ! -z "$SHELL_DEBUG" ]; then echo done creating temporary directory....; fi +if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo done creating temporary directory....; fi diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index fbdf0ac8..6c8bc68a 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -11,7 +11,7 @@ skip_all= type function_sentinel &>/dev/null if [ $? -eq 0 ]; then # there was no error, so we can skip the inits. - if [ ! -z "$SHELL_DEBUG" ]; then + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "skipping function definitions, because already defined." fi skip_all=yes @@ -21,7 +21,7 @@ fi if [ -z "$skip_all" ]; then - if [ ! -z "$SHELL_DEBUG" ]; then + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "feisty meow function definitions beginning now..." fi @@ -742,7 +742,7 @@ return 0 return 0; } - if [ ! -z "$SHELL_DEBUG" ]; then echo "feisty meow function definitions done."; fi + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "feisty meow function definitions done."; fi ############## diff --git a/scripts/core/generate_aliases.pl b/scripts/core/generate_aliases.pl index 50e4bd56..2f87acc0 100644 --- a/scripts/core/generate_aliases.pl +++ b/scripts/core/generate_aliases.pl @@ -23,7 +23,7 @@ require "filename_helper.pl"; -use Env qw(FEISTY_MEOW_BINARIES BUILD_TOP FEISTY_MEOW_APEX FEISTY_MEOW_LOADING_DOCK FEISTY_MEOW_SCRIPTS SHELL_DEBUG ); +use Env qw(FEISTY_MEOW_BINARIES BUILD_TOP FEISTY_MEOW_APEX FEISTY_MEOW_LOADING_DOCK FEISTY_MEOW_SCRIPTS DEBUG_FEISTY_MEOW ); # given a possible aliasable filename, this will decide whether to create a perl # or bash alias for it. it needs the filename of the possible alias and the @@ -78,14 +78,14 @@ sub load_file_names { # loaded also. sub rebuild_script_aliases { - if (length($SHELL_DEBUG)) { + if (length($DEBUG_FEISTY_MEOW)) { print "rebuilding generated aliases file...\n"; } # create our generated shells directory if it's not already. if ( ! -d $FEISTY_MEOW_LOADING_DOCK ) { mkdir $FEISTY_MEOW_LOADING_DOCK; - if (length($SHELL_DEBUG)) { + if (length($DEBUG_FEISTY_MEOW)) { print "made FEISTY_MEOW_LOADING_DOCK at '$FEISTY_MEOW_LOADING_DOCK'\n"; } } @@ -100,7 +100,7 @@ sub rebuild_script_aliases { foreach $i (&glob_list("$FEISTY_MEOW_LOADING_DOCK/custom/*.alias")) { if (-f $i) { push(@ALIAS_DEFINITION_FILES, $i); } } - if (length($SHELL_DEBUG)) { + if (length($DEBUG_FEISTY_MEOW)) { print "using these alias files:\n"; foreach $i (@ALIAS_DEFINITION_FILES) { local $base_of_dir = &basename(&dirname($i)); @@ -112,7 +112,7 @@ sub rebuild_script_aliases { # write the aliases for sh and bash scripts. local $GENERATED_ALIAS_FILE = "$FEISTY_MEOW_LOADING_DOCK/fmc_core_and_custom_aliases.sh"; - if (length($SHELL_DEBUG)) { + if (length($DEBUG_FEISTY_MEOW)) { print "writing generated aliases in $GENERATED_ALIAS_FILE...\n"; } @@ -142,7 +142,7 @@ sub rebuild_script_aliases { close GENOUT; - if (length($SHELL_DEBUG)) { + if (length($DEBUG_FEISTY_MEOW)) { print("done rebuilding generated aliases file.\n"); } } @@ -184,7 +184,7 @@ if (-d $FEISTY_MEOW_BINARIES) { # trash the old versions. unlink("$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh"); -if (length($SHELL_DEBUG)) { +if (length($DEBUG_FEISTY_MEOW)) { printf "writing $FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh...\n"; } diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index b9ba1d72..040f2ff3 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -10,11 +10,11 @@ ############## -# SHELL_DEBUG: if this variable is non-empty, then it causes the feisty meow +# DEBUG_FEISTY_MEOW: if this variable is non-empty, then it causes the feisty meow # scripts to print more diagnostic information when they run. not all # scripts support this, but the core ones do. -#export SHELL_DEBUG=true +#export DEBUG_FEISTY_MEOW=true ############## @@ -120,12 +120,12 @@ if [ -z "$ERROR_OCCURRED" ]; then # perform the bulkier parts of the initialization process. - if [ ! -z "$SHELL_DEBUG" ]; then echo "heavyweight init begins..."; fi + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "heavyweight init begins..."; fi # set up the aliases for the shell, but only if they are not already set. type CORE_ALIASES_LOADED &>/dev/null if [ $? -ne 0 ]; then - if [ ! -z "$SHELL_DEBUG" ]; then + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "the aliases were missing, now they are being added..." fi source "$FEISTY_MEOW_LOADING_DOCK/fmc_core_and_custom_aliases.sh" @@ -137,7 +137,7 @@ if [ -z "$ERROR_OCCURRED" ]; then # a minor tickle of the title of the terminal, unless we already have some history. label_terminal_with_info - if [ ! -z "$SHELL_DEBUG" ]; then echo "heavyweight init is done."; fi + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "heavyweight init is done."; fi if [ -z "$ERROR_OCCURRED" ]; then # set a sentinel variable to say we loaded the feisty meow environment. diff --git a/scripts/core/reconfigure_feisty_meow.sh b/scripts/core/reconfigure_feisty_meow.sh index e44d017c..dad26d14 100644 --- a/scripts/core/reconfigure_feisty_meow.sh +++ b/scripts/core/reconfigure_feisty_meow.sh @@ -64,7 +64,7 @@ source "$FEISTY_MEOW_SCRIPTS/core/variables.sh" # create our common aliases. perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl" -if [ ! -z "$SHELL_DEBUG" ]; then +if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo established these variables for feisty_meow assets: echo ============== cat "$FEISTY_MEOW_VARIABLES_LOADING_FILE" diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index 9d84f8ce..b5ea3456 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -51,7 +51,7 @@ define_yeti_variable TERM # we'll run this again only if we think it's needed. if [ -z "$CORE_VARIABLES_LOADED" ]; then - if [ ! -z "$SHELL_DEBUG" ]; then echo variables initialization begins...; fi + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo variables initialization begins...; fi ############## @@ -106,15 +106,15 @@ if [ -z "$CORE_VARIABLES_LOADED" ]; then fi # set up the top-level for all build creations and logs and such. - if [ -z "$GENERATED_STORE" ]; then - define_yeti_variable GENERATED_STORE="$TMP/generated-feisty_meow" + if [ -z "$FEISTY_MEOW_GENERATED_STORE" ]; then + define_yeti_variable FEISTY_MEOW_GENERATED_STORE="$TMP/generated-feisty_meow" fi - if [ ! -d "$GENERATED_STORE" ]; then - mkdir -p "$GENERATED_STORE" + if [ ! -d "$FEISTY_MEOW_GENERATED_STORE" ]; then + mkdir -p "$FEISTY_MEOW_GENERATED_STORE" fi # set up our effluent outsourcing valves. if [ -z "$TEMPORARIES_PILE" ]; then - define_yeti_variable TEMPORARIES_PILE="$GENERATED_STORE/temporaries" + define_yeti_variable TEMPORARIES_PILE="$FEISTY_MEOW_GENERATED_STORE/temporaries" fi if [ ! -d "$TEMPORARIES_PILE" ]; then mkdir -p "$TEMPORARIES_PILE" @@ -262,7 +262,7 @@ if [ -z "$CORE_VARIABLES_LOADED" ]; then define_yeti_variable CORE_VARIABLES_LOADED=true - if [ ! -z "$SHELL_DEBUG" ]; then echo variables initialization ends....; fi + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo variables initialization ends....; fi fi ############## @@ -277,7 +277,7 @@ for i in $FEISTY_MEOW_LOADING_DOCK/custom/*.sh; do # skip it if it's not real. continue; fi - if [ ! -z "$SHELL_DEBUG" ]; then + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "loading customization: $(basename $(dirname $i))/$(basename $i)" fi source "$i" diff --git a/scripts/customize/fred/java_profile.sh b/scripts/customize/fred/java_profile.sh index 672df77d..ba26b72a 100644 --- a/scripts/customize/fred/java_profile.sh +++ b/scripts/customize/fred/java_profile.sh @@ -13,7 +13,7 @@ source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" function intuition_failure() { missing="$1"; shift - if [ ! -z "$SHELL_DEBUG" ]; then + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "Could not intuit '$missing' variable." fi # remove the variable because its value is busted. diff --git a/scripts/files/safedel.pl b/scripts/files/safedel.pl index b34e852f..ef4ffcb4 100644 --- a/scripts/files/safedel.pl +++ b/scripts/files/safedel.pl @@ -24,7 +24,7 @@ require "filename_helper.pl"; require "inc_num.pl"; require "zap_the_dir.pl"; -use Env qw(TMP OS SHELL_DEBUG); +use Env qw(TMP OS DEBUG_FEISTY_MEOW); #hmmm: need a usage statement. @@ -132,7 +132,7 @@ sub safedel { } } if (@deleted) { - if ($SHELL_DEBUG != "") { + if ($DEBUG_FEISTY_MEOW != "") { print "Trashed [@deleted].\n"; } open(REPORT, ">>$TMP/zz_safedel_report.txt"); diff --git a/scripts/generator/build_variables.sh b/scripts/generator/build_variables.sh index 18f402f7..3139aac7 100644 --- a/scripts/generator/build_variables.sh +++ b/scripts/generator/build_variables.sh @@ -80,11 +80,11 @@ else # the system is unknown, so we give up on guessing. export OPERATING_SYSTEM=unknown fi -if [ ! -z "$SHELL_DEBUG" ]; then +if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "[OS is \"$OPERATING_SYSTEM\"]" fi -if [ ! -z "$SHELL_DEBUG" ]; then +if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "[FEISTY_MEOW_APEX is $FEISTY_MEOW_APEX]" fi @@ -102,25 +102,25 @@ export BUILD_TOP="$FEISTY_MEOW_APEX" export PRODUCTION_STORE="$BUILD_TOP/production" ## set up the top-level for all build creations and logs and such. -#export GENERATED_STORE="$TMP/generated-feisty_meow" -#if [ ! -d "$GENERATED_STORE" ]; then -# mkdir -p "$GENERATED_STORE" +#export FEISTY_MEOW_GENERATED_STORE="$TMP/generated-feisty_meow" +#if [ ! -d "$FEISTY_MEOW_GENERATED_STORE" ]; then +# mkdir -p "$FEISTY_MEOW_GENERATED_STORE" #fi ## set up our effluent outsourcing valves. -#export TEMPORARIES_PILE="$GENERATED_STORE/temporaries" +#export TEMPORARIES_PILE="$FEISTY_MEOW_GENERATED_STORE/temporaries" #if [ ! -d "$TEMPORARIES_PILE" ]; then # mkdir -p "$TEMPORARIES_PILE" #fi # this variable points at a folder where we store the generated products of # the build, such as the binaries and installer packages. -export RUNTIME_PATH="$GENERATED_STORE/runtime" +export RUNTIME_PATH="$FEISTY_MEOW_GENERATED_STORE/runtime" if [ ! -d "$RUNTIME_PATH" ]; then mkdir -p "$RUNTIME_PATH" fi # we define a log file storage area that can be relied on by the build. -export FEISTY_MEOW_LOGS="$GENERATED_STORE/logs" +export FEISTY_MEOW_LOGS="$FEISTY_MEOW_GENERATED_STORE/logs" if [ ! -d "$FEISTY_MEOW_LOGS" ]; then mkdir -p "$FEISTY_MEOW_LOGS" fi @@ -129,7 +129,7 @@ fi # debugging area where we say what we think we know. -if [ ! -z "$SHELL_DEBUG" ]; then +if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo scripts: $BUILD_SCRIPTS_PATH echo build tools hier: $BUILDING_HIERARCHY echo this tool: $THIS_TOOL_NAME diff --git a/scripts/generator/minimize_feisty_meow.sh b/scripts/generator/minimize_feisty_meow.sh index f956ad14..3f16cc94 100644 --- a/scripts/generator/minimize_feisty_meow.sh +++ b/scripts/generator/minimize_feisty_meow.sh @@ -9,7 +9,7 @@ source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" sep echo "Cleaning up feisty meow generated files..." -pushd $GENERATED_STORE +pushd $FEISTY_MEOW_GENERATED_STORE \rm -rf logs clam_tmp temporaries/* diff --git a/scripts/generator/produce_feisty_meow.sh b/scripts/generator/produce_feisty_meow.sh index dcac3652..5b3135d0 100644 --- a/scripts/generator/produce_feisty_meow.sh +++ b/scripts/generator/produce_feisty_meow.sh @@ -258,7 +258,7 @@ if [ -z "$JUST_BOOTSTRAP_APPS" ]; then #wrong! we don't want to whack it all. clean # recreate our useful junk directories... - mkdir -p "$GENERATED_STORE" + mkdir -p "$FEISTY_MEOW_GENERATED_STORE" mkdir -p "$TEMPORARIES_PILE" mkdir -p "$FEISTY_MEOW_LOGS" diff --git a/scripts/generator/whack_build.sh b/scripts/generator/whack_build.sh index 9051c1a8..b050ca38 100644 --- a/scripts/generator/whack_build.sh +++ b/scripts/generator/whack_build.sh @@ -27,8 +27,8 @@ function whack_single_build_area() # avoid accidentally removing important stuff if our variables have not been previously # established. - if [ -z "$GENERATED_STORE" -o -z "$TEMPORARIES_PILE" ]; then - echo The build whacking script cannot run because either the GENERATED_STORE + if [ -z "$FEISTY_MEOW_GENERATED_STORE" -o -z "$TEMPORARIES_PILE" ]; then + echo The build whacking script cannot run because either the FEISTY_MEOW_GENERATED_STORE echo variable or the TEMPORARIES_PILE variable have not been set. This makes echo it unsafe to remove anything in the build products. exit 1 @@ -37,8 +37,8 @@ function whack_single_build_area() # kerzap. the cleanups in production directory remove older locations of generated files. rm -rf \ "$FEISTY_MEOW_APEX/generatedJUnitFiles" \ - "$GENERATED_STORE/clam_tmp" \ - "$GENERATED_STORE/logs" \ + "$FEISTY_MEOW_GENERATED_STORE/clam_tmp" \ + "$FEISTY_MEOW_GENERATED_STORE/logs" \ "$PRODUCTION_STORE/__build_"*.h \ "$PRODUCTION_STORE/manifest.txt" \ "$RUNTIME_PATH/binaries" \ diff --git a/scripts/generator/wrapdoze.sh b/scripts/generator/wrapdoze.sh index b4ea47f6..d38b432b 100755 --- a/scripts/generator/wrapdoze.sh +++ b/scripts/generator/wrapdoze.sh @@ -75,7 +75,7 @@ function dossify_and_run_commands() real_commands+=($(echo $i | sed -e 's/\//\\/g')) done - if [ ! -z "$SHELL_DEBUG" ]; then + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo commands are now: for i in "${real_commands[@]}"; do echo -n "$i " diff --git a/scripts/rev_control/getem.sh b/scripts/rev_control/getem.sh index 225ce698..86c9531b 100644 --- a/scripts/rev_control/getem.sh +++ b/scripts/rev_control/getem.sh @@ -12,7 +12,7 @@ source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh" # first so we can do an orange-to-orange compare. tmpdir="$(cd $TMP; \pwd)" if [ "$(\pwd)" != "$tmpdir" ]; then - if [ ! -z "$SHELL_DEBUG" ]; then + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "moving to the TMP directory to avoid file access conflicts..." fi new_name="$TMP/zz_$(basename $0)"