# runs the nechung oracle program at exit from bash.
sep 79
-$GENERATED_STORE/runtime/binaries/nechung
+$FEISTY_MEOW_GENERATED_STORE/runtime/binaries/nechung
echo
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
##############
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");
[Common]
-LogPath=$GENERATED_STORE/logs
+LogPath=$FEISTY_MEOW_GENERATED_STORE/logs
# 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???
# 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
##############
# 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.
# 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
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
if [ -z "$skip_all" ]; then
- if [ ! -z "$SHELL_DEBUG" ]; then
+ if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then
echo "feisty meow function definitions beginning now..."
fi
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
##############
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
# 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";
}
}
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));
# 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";
}
close GENOUT;
- if (length($SHELL_DEBUG)) {
+ if (length($DEBUG_FEISTY_MEOW)) {
print("done rebuilding generated aliases file.\n");
}
}
# 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";
}
##############
-# 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
##############
# 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"
# 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.
# 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"
# 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
##############
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"
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
##############
# 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"
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.
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.
}
}
if (@deleted) {
- if ($SHELL_DEBUG != "") {
+ if ($DEBUG_FEISTY_MEOW != "") {
print "Trashed [@deleted].\n";
}
open(REPORT, ">>$TMP/zz_safedel_report.txt");
# 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
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
# 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
sep
echo "Cleaning up feisty meow generated files..."
-pushd $GENERATED_STORE
+pushd $FEISTY_MEOW_GENERATED_STORE
\rm -rf logs clam_tmp temporaries/*
#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"
# 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
# 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" \
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 "
# 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)"