From 8cae6bcb0a4c8962c18d50f7323558dddf299b2f Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sat, 5 Dec 2015 12:16:48 -0500 Subject: [PATCH] moving to a better name than FEISTY_MEOW_GENERATED for chewed scripts folder. too many things are mentioning generated, so this is now the FEISTY_MEOW_LOADING_DOCK variable. urgh. other changes to add -p to mkdir for making parents also. better checking in whack build and stopped attempting to redefine crucial variables there if not defined, since that's bad news. --- customizing/fred/scripts/sftp.sh | 2 +- customizing/fred/scripts/ssh.sh | 2 +- customizing/readme.txt | 2 +- doc/doc_fodder/perl_tools.html | 6 +-- scripts/archival/unpack.sh | 2 +- scripts/buildor/get_mono_2.10.sh | 2 +- scripts/buildor/refresh_gffs_build.sh | 2 +- scripts/clam/cpp/postconditions.sh | 8 ++-- scripts/clam/cpp/preconditions.sh | 18 ++++----- scripts/clam/dotnet-retired/postconditions.sh | 2 +- scripts/clam/dotnet-retired/preconditions.sh | 22 +++++------ scripts/core/bootstrap_shells.sh | 18 ++++----- scripts/core/common.alias | 4 +- scripts/core/create_tempdir.sh | 2 +- scripts/core/functions.sh | 12 +++--- scripts/core/generate_aliases.pl | 38 +++++++++---------- scripts/core/launch_feisty_meow.sh | 10 ++--- scripts/core/variables.sh | 25 +++++++++--- scripts/generator/bootstrap_build.sh | 2 +- scripts/generator/build_variables.sh | 20 +++++----- scripts/generator/whack_build.sh | 26 ++++++------- scripts/makefile | 6 +-- scripts/rev_control/version_control.sh | 2 +- scripts/system/osx_cd_mounter.sh | 2 +- scripts/text/smoove_lists.sh | 2 +- 25 files changed, 124 insertions(+), 113 deletions(-) diff --git a/customizing/fred/scripts/sftp.sh b/customizing/fred/scripts/sftp.sh index 2db8612c..c668500c 100644 --- a/customizing/fred/scripts/sftp.sh +++ b/customizing/fred/scripts/sftp.sh @@ -1,6 +1,6 @@ #!/bin/bash -source "$FEISTY_MEOW_GENERATED/custom/scripts/pick_credentials.sh" +source "$FEISTY_MEOW_LOADING_DOCK/custom/scripts/pick_credentials.sh" # a wrapper for the file transfers using secure shell. \sftp -i "$keyfile" $* diff --git a/customizing/fred/scripts/ssh.sh b/customizing/fred/scripts/ssh.sh index 39856a89..f9cdb7ca 100755 --- a/customizing/fred/scripts/ssh.sh +++ b/customizing/fred/scripts/ssh.sh @@ -2,7 +2,7 @@ # wraps our calling the secure shell and lets us pick our credentials. -source "$FEISTY_MEOW_GENERATED/custom/scripts/pick_credentials.sh" +source "$FEISTY_MEOW_LOADING_DOCK/custom/scripts/pick_credentials.sh" # save the former terminal title if we're running in X with xterm. prior_title= diff --git a/customizing/readme.txt b/customizing/readme.txt index 554f9278..79cd1ecb 100644 --- a/customizing/readme.txt +++ b/customizing/readme.txt @@ -7,5 +7,5 @@ and it can also have shell scripts that are sourced into the main-line of script initialization (any files ending in .sh). when you have some custom scripts you want to use, copy them from your own -folder to the $FEISTY_MEOW_GENERATED/custom directory. +folder to the $FEISTY_MEOW_LOADING_DOCK/custom directory. diff --git a/doc/doc_fodder/perl_tools.html b/doc/doc_fodder/perl_tools.html index 0cb75506..fa6667e0 100644 --- a/doc/doc_fodder/perl_tools.html +++ b/doc/doc_fodder/perl_tools.html @@ -219,10 +219,8 @@ PCDOS, OS/2 and MS-WIN32 (9x, NT, 2K, XP, etc) for supported operating systems.  The shell languages supported are dos's command, nt's cmd, unix's sh and bash, and perl.  This script will also look for any files ending in ".sh" or ".pl" and it will create aliases for them -in forms appropriate to the different shells.  The .zz_auto_gen -subdirectory -is created under the home directory as -a storage place for the generated +in forms appropriate to the different shells.  The .zz_feisty_loading +subdirectory is created under the home directory as a storage place for the generated script files.

new_sig.pl

diff --git a/scripts/archival/unpack.sh b/scripts/archival/unpack.sh index 3fca182d..5a882cfc 100644 --- a/scripts/archival/unpack.sh +++ b/scripts/archival/unpack.sh @@ -30,7 +30,7 @@ if [ -z "$unpack_dir" ]; then fi if [ ! -d "$unpack_dir" ]; then - mkdir "$unpack_dir" + mkdir -p "$unpack_dir" if [ $? -ne 0 ]; then echo "Could not create the unpacking directory: $unpack_dir" exit 1 diff --git a/scripts/buildor/get_mono_2.10.sh b/scripts/buildor/get_mono_2.10.sh index a479d378..b3d1f0fa 100644 --- a/scripts/buildor/get_mono_2.10.sh +++ b/scripts/buildor/get_mono_2.10.sh @@ -1,5 +1,5 @@ -mkdir mono-2.10 +mkdir -p mono-2.10 cd mono-2.10 wget --no-check-certificate https://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/ubuntu/install_mono-2.10.sh chmod 755 install_mono-2.10.sh diff --git a/scripts/buildor/refresh_gffs_build.sh b/scripts/buildor/refresh_gffs_build.sh index 8976eaf8..8eb04e87 100644 --- a/scripts/buildor/refresh_gffs_build.sh +++ b/scripts/buildor/refresh_gffs_build.sh @@ -12,7 +12,7 @@ echo cleaning out the logs directory... echo making a simple starting log file for container... if [ ! -d "$GFFS_LOGS" ]; then - mkdir "$GFFS_LOGS" + mkdir -p "$GFFS_LOGS" check_result Making GFFS logs directory. fi diff --git a/scripts/clam/cpp/postconditions.sh b/scripts/clam/cpp/postconditions.sh index 90e96578..1c1490bf 100755 --- a/scripts/clam/cpp/postconditions.sh +++ b/scripts/clam/cpp/postconditions.sh @@ -25,13 +25,13 @@ for i in *.resources; do rm -f "$i"; done # causes the shell to quit. DIE="source $CLAM_DIR/exit_make.sh" -if [ ! -d $TARGETS_DIR ]; then mkdir $TARGETS_DIR; fi +if [ ! -d $TARGETS_DIR ]; then mkdir -p $TARGETS_DIR; fi if [ "$TYPE" = "library" ]; then # make sure the required directories exist. - if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir $STATIC_LIBRARY_DIR; fi - if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir $DYNAMIC_LIBRARY_DIR; fi + if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir -p $STATIC_LIBRARY_DIR; fi + if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir -p $DYNAMIC_LIBRARY_DIR; fi elif [[ "$TYPE" == "application" || "$TYPE" == "test" ]]; then @@ -39,7 +39,7 @@ elif [[ "$TYPE" == "application" || "$TYPE" == "test" ]]; then # this project's final directory. # first make sure the executable directory is around. - if [ ! -d $EXECUTABLE_DIR ]; then mkdir $EXECUTABLE_DIR; fi + if [ ! -d $EXECUTABLE_DIR ]; then mkdir -p $EXECUTABLE_DIR; fi if [ -z "$NO_COMPILE" ]; then # we ensure that none of the normal products are copied for a non-compiling diff --git a/scripts/clam/cpp/preconditions.sh b/scripts/clam/cpp/preconditions.sh index 391f0ef0..1197a222 100755 --- a/scripts/clam/cpp/preconditions.sh +++ b/scripts/clam/cpp/preconditions.sh @@ -2,7 +2,7 @@ # prepares the project for compilation by creating the appropriate directories. # make sure our temp directory is there. -if [ ! -d $CLAM_TMP ]; then mkdir $CLAM_TMP; fi +if [ ! -d $CLAM_TMP ]; then mkdir -p $CLAM_TMP; fi # if the clean flag is defined, then we need to quit. we should not be # creating directories or doing other tasks for a build that is really @@ -12,23 +12,23 @@ if [ ! -z "$CLEAN" ]; then fi # make sure generated files have a home. -if [ ! -d $TARGETS_DIR ]; then mkdir $TARGETS_DIR; fi +if [ ! -d $TARGETS_DIR ]; then mkdir -p $TARGETS_DIR; fi # create the generated files storage area. -if [ ! -d $OUTPUT_ROOT ]; then mkdir $OUTPUT_ROOT; fi +if [ ! -d $OUTPUT_ROOT ]; then mkdir -p $OUTPUT_ROOT; fi # create the top level object directory if it doesn't exist. -if [ ! -d $BASE_OUTPUT_PATH ]; then mkdir $BASE_OUTPUT_PATH; fi +if [ ! -d $BASE_OUTPUT_PATH ]; then mkdir -p $BASE_OUTPUT_PATH; fi # create the project level object directory if it is non-existent. -if [ ! -d $OUTPUT_PATH ]; then mkdir $OUTPUT_PATH; fi +if [ ! -d $OUTPUT_PATH ]; then mkdir -p $OUTPUT_PATH; fi # create a directory to hold any debugging files, if necessary. -if [ ! -d $PDB_DIR ]; then mkdir $PDB_DIR; fi +if [ ! -d $PDB_DIR ]; then mkdir -p $PDB_DIR; fi # ####if [ ! -d $TESTS_DIR ]; then mkdir $TESTS_DIR; fi # -if [ ! -d $EXECUTABLE_DIR ]; then mkdir $EXECUTABLE_DIR; fi +if [ ! -d $EXECUTABLE_DIR ]; then mkdir -p $EXECUTABLE_DIR; fi # -if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir $DYNAMIC_LIBRARY_DIR; fi +if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir -p $DYNAMIC_LIBRARY_DIR; fi # -if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir $STATIC_LIBRARY_DIR; fi +if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir -p $STATIC_LIBRARY_DIR; fi # set versions on any extras that were specified in the makefile. if [ ! -z "$EXTRA_VERSIONS" ]; then diff --git a/scripts/clam/dotnet-retired/postconditions.sh b/scripts/clam/dotnet-retired/postconditions.sh index cbdd6bc9..1670e27e 100644 --- a/scripts/clam/dotnet-retired/postconditions.sh +++ b/scripts/clam/dotnet-retired/postconditions.sh @@ -35,7 +35,7 @@ DIE=". $CLAM_DIR/exit_make.sh" if [ "$TYPE" = "library" ]; then # make sure the required directories exist. - if [ ! -d $ROOT ]; then mkdir $ROOT; fi + if [ ! -d $ROOT ]; then mkdir -p $ROOT; fi if [ ! -d $LIB_DIR ]; then mkdir $LIB_DIR; fi if [ ! -d $DLL_DIR ]; then mkdir $DLL_DIR; fi diff --git a/scripts/clam/dotnet-retired/preconditions.sh b/scripts/clam/dotnet-retired/preconditions.sh index 4ed64fe8..6ef35979 100644 --- a/scripts/clam/dotnet-retired/preconditions.sh +++ b/scripts/clam/dotnet-retired/preconditions.sh @@ -2,27 +2,27 @@ # prepares the project for compilation by creating the appropriate directories. # make sure the top-level repository exists. -if [ ! -d $FEISTY_MEOW_DIR ]; then mkdir $FEISTY_MEOW_DIR; fi +if [ ! -d $FEISTY_MEOW_DIR ]; then mkdir -p $FEISTY_MEOW_DIR; fi # make sure our temp directory is there. -if [ ! -d $CLAM_TMP ]; then mkdir $CLAM_TMP; fi +if [ ! -d $CLAM_TMP ]; then mkdir -p $CLAM_TMP; fi # make sure the generated files have a home. -if [ ! -d $TARGETS_DIR ]; then mkdir $TARGETS_DIR; fi +if [ ! -d $TARGETS_DIR ]; then mkdir -p $TARGETS_DIR; fi # create the generated files storage area. -if [ ! -d $OUTPUT_ROOT ]; then mkdir $OUTPUT_ROOT; fi +if [ ! -d $OUTPUT_ROOT ]; then mkdir -p $OUTPUT_ROOT; fi # create the top level object directory if it doesn't exist. -if [ ! -d $BASE_OUTPUT_PATH ]; then mkdir $BASE_OUTPUT_PATH; fi +if [ ! -d $BASE_OUTPUT_PATH ]; then mkdir -p $BASE_OUTPUT_PATH; fi # create the project level object directory if it is non-existent. -if [ ! -d $OUTPUT_PATH ]; then mkdir $OUTPUT_PATH; fi +if [ ! -d $OUTPUT_PATH ]; then mkdir -p $OUTPUT_PATH; fi # create a directory to hold any debugging files, if necessary. -if [ ! -d $PDB_DIR ]; then mkdir $PDB_DIR; fi +if [ ! -d $PDB_DIR ]; then mkdir -p $PDB_DIR; fi # -if [ ! -d $TESTS_DIR ]; then mkdir $TESTS_DIR; fi +if [ ! -d $TESTS_DIR ]; then mkdir -p $TESTS_DIR; fi # -if [ ! -d $EXECUTABLE_DIR ]; then mkdir $EXECUTABLE_DIR; fi +if [ ! -d $EXECUTABLE_DIR ]; then mkdir -p $EXECUTABLE_DIR; fi # -if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir $DYNAMIC_LIBRARY_DIR; fi +if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir -p $DYNAMIC_LIBRARY_DIR; fi # -if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir $STATIC_LIBRARY_DIR; fi +if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir -p $STATIC_LIBRARY_DIR; fi # set versions on any extras that were specified in the makefile. if [ ! -z "$EXTRA_VERSIONS" ]; then diff --git a/scripts/core/bootstrap_shells.sh b/scripts/core/bootstrap_shells.sh index 0b3e9975..2810b969 100644 --- a/scripts/core/bootstrap_shells.sh +++ b/scripts/core/bootstrap_shells.sh @@ -36,22 +36,22 @@ popd &>/dev/null export FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_DIR/scripts" -# FEISTY_MEOW_GENERATED is where the generated files feisty_meow uses are located. -export FEISTY_MEOW_GENERATED="$HOME/.zz_auto_gen" -if [ ! -d "$FEISTY_MEOW_GENERATED" ]; then - mkdir "$FEISTY_MEOW_GENERATED" +# FEISTY_MEOW_LOADING_DOCK is where the generated files feisty_meow uses are located. +export FEISTY_MEOW_LOADING_DOCK="$HOME/.zz_feisty_loading" +if [ ! -d "$FEISTY_MEOW_LOADING_DOCK" ]; then + mkdir -p "$FEISTY_MEOW_LOADING_DOCK" fi # make toast out of generated files right away, but leave any custom scripts. -find "$FEISTY_MEOW_GENERATED" -maxdepth 1 -type f -exec rm -f "{}" ';' &>/dev/null -if [ ! -d "$FEISTY_MEOW_GENERATED/custom" ]; then - mkdir "$FEISTY_MEOW_GENERATED/custom" +find "$FEISTY_MEOW_LOADING_DOCK" -maxdepth 1 -type f -exec rm -f "{}" ';' &>/dev/null +if [ ! -d "$FEISTY_MEOW_LOADING_DOCK/custom" ]; then + mkdir "$FEISTY_MEOW_LOADING_DOCK/custom" fi # just a variable we use in here to refer to the generated variables file. -GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_GENERATED/fmc_variables.sh" +GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_LOADING_DOCK/fmc_variables.sh" # create the alias file as totally blank. echo -n >"$GENERATED_FEISTY_MEOW_VARIABLES" -for i in FEISTY_MEOW_DIR FEISTY_MEOW_SCRIPTS FEISTY_MEOW_GENERATED; do +for i in FEISTY_MEOW_DIR FEISTY_MEOW_SCRIPTS FEISTY_MEOW_LOADING_DOCK; do echo "export $i=${!i}" >>"$GENERATED_FEISTY_MEOW_VARIABLES" done diff --git a/scripts/core/common.alias b/scripts/core/common.alias index 0868f232..cf8f49b3 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -99,9 +99,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_GENERATED/fmc_aliases_for_scripts.sh" ]; then +if [ -f "$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh" ]; then if [ ! -z "$SHELL_DEBUG" ]; then echo loading script aliases...; fi - source "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh" + source "$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh" if [ ! -z "$SHELL_DEBUG" ]; then echo done loading script aliases.; fi fi diff --git a/scripts/core/create_tempdir.sh b/scripts/core/create_tempdir.sh index aca92ae7..5d3a5b2f 100644 --- a/scripts/core/create_tempdir.sh +++ b/scripts/core/create_tempdir.sh @@ -19,7 +19,7 @@ LOG_FILE=$TMP/zz_transients.log word=Verified if [ ! -d "$TMP" ]; then - mkdir $TMP + mkdir -p $TMP word=Created chown $USER $TMP if [ $? -ne 0 ]; then diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index c1c3c8b6..724dacb3 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -373,7 +373,7 @@ if [ -z "$skip_all" ]; then # interesting note perhaps: found that the NETHACKOPTIONS variable was # not being unset correctly when preceded by an alias. split them up # like they are now due to that bug. - unset -v CORE_ALIASES_LOADED FEISTY_MEOW_GENERATED NECHUNG NETHACKOPTIONS + unset -v CORE_ALIASES_LOADED FEISTY_MEOW_LOADING_DOCK NECHUNG NETHACKOPTIONS unset -f function_sentinel # reload feisty meow environment in current shell. source $FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh @@ -422,8 +422,8 @@ if [ -z "$skip_all" ]; then return 1 fi regenerate >/dev/null - pushd "$FEISTY_MEOW_GENERATED/custom" &>/dev/null - local incongruous_files="$(bash "$FEISTY_MEOW_SCRIPTS/files/list_non_dupes.sh" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_GENERATED/custom")" + pushd "$FEISTY_MEOW_LOADING_DOCK/custom" &>/dev/null + local incongruous_files="$(bash "$FEISTY_MEOW_SCRIPTS/files/list_non_dupes.sh" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_LOADING_DOCK/custom")" if [ ${#incongruous_files} -ge 1 ]; then echo "cleaning unknown older overrides..." perl "$FEISTY_MEOW_SCRIPTS/files/safedel.pl" $incongruous_files @@ -431,11 +431,11 @@ if [ -z "$skip_all" ]; then fi popd &>/dev/null echo "copying custom overrides for $user" - mkdir "$FEISTY_MEOW_GENERATED/custom" 2>/dev/null - perl "$FEISTY_MEOW_SCRIPTS/text/cpdiff.pl" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_GENERATED/custom" + mkdir -p "$FEISTY_MEOW_LOADING_DOCK/custom" 2>/dev/null + perl "$FEISTY_MEOW_SCRIPTS/text/cpdiff.pl" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_LOADING_DOCK/custom" if [ -d "$FEISTY_MEOW_DIR/customizing/$user/scripts" ]; then echo "copying custom scripts for $user" - \cp -R "$FEISTY_MEOW_DIR/customizing/$user/scripts" "$FEISTY_MEOW_GENERATED/custom/" + \cp -R "$FEISTY_MEOW_DIR/customizing/$user/scripts" "$FEISTY_MEOW_LOADING_DOCK/custom/" fi echo regenerate diff --git a/scripts/core/generate_aliases.pl b/scripts/core/generate_aliases.pl index a96fae3f..28e1da82 100644 --- a/scripts/core/generate_aliases.pl +++ b/scripts/core/generate_aliases.pl @@ -23,7 +23,7 @@ require "filename_helper.pl"; -use Env qw(BINDIR BUILD_TOP FEISTY_MEOW_DIR FEISTY_MEOW_GENERATED FEISTY_MEOW_SCRIPTS SHELL_DEBUG ); +use Env qw(BINDIR BUILD_TOP FEISTY_MEOW_DIR FEISTY_MEOW_LOADING_DOCK FEISTY_MEOW_SCRIPTS SHELL_DEBUG ); # 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 @@ -74,7 +74,7 @@ sub load_file_names { # The "common.alias" file is used in the generated aliases file as a base # set of generally useful aliases. We also add aliases for any script files # (perl, bash, python, etc) that we find in the feisty meow script hierarchy. -# Any *.alias files found in the $FEISTY_MEOW_GENERATED/custom folder are +# Any *.alias files found in the $FEISTY_MEOW_LOADING_DOCK/custom folder are # loaded also. sub rebuild_script_aliases { @@ -83,10 +83,10 @@ sub rebuild_script_aliases { } # create our generated shells directory if it's not already. - if ( ! -d $FEISTY_MEOW_GENERATED ) { - mkdir $FEISTY_MEOW_GENERATED; + if ( ! -d $FEISTY_MEOW_LOADING_DOCK ) { + mkdir $FEISTY_MEOW_LOADING_DOCK; if (length($SHELL_DEBUG)) { - print "made FEISTY_MEOW_GENERATED at '$FEISTY_MEOW_GENERATED'\n"; + print "made FEISTY_MEOW_LOADING_DOCK at '$FEISTY_MEOW_LOADING_DOCK'\n"; } } @@ -97,7 +97,7 @@ sub rebuild_script_aliases { @ALIAS_DEFINITION_FILES = ("$FEISTY_MEOW_SCRIPTS/core/common.alias"); # if custom aliases files exist, add them to the list. - foreach $i (&glob_list("$FEISTY_MEOW_GENERATED/custom/*.alias")) { + foreach $i (&glob_list("$FEISTY_MEOW_LOADING_DOCK/custom/*.alias")) { if (-f $i) { push(@ALIAS_DEFINITION_FILES, $i); } } if (length($SHELL_DEBUG)) { @@ -111,7 +111,7 @@ sub rebuild_script_aliases { # write the aliases for sh and bash scripts. - local $GENERATED_ALIAS_FILE = "$FEISTY_MEOW_GENERATED/fmc_core_and_custom_aliases.sh"; + local $GENERATED_ALIAS_FILE = "$FEISTY_MEOW_LOADING_DOCK/fmc_core_and_custom_aliases.sh"; if (length($SHELL_DEBUG)) { print "writing generated aliases in $GENERATED_ALIAS_FILE...\n"; } @@ -150,9 +150,9 @@ sub rebuild_script_aliases { ############## # make sure we know where to store the files we're creating. -if ( ! length("$FEISTY_MEOW_GENERATED") ) { +if ( ! length("$FEISTY_MEOW_LOADING_DOCK") ) { print "\ -The FEISTY_MEOW_GENERATED variable is not defined. This must point to the location where\n\ +The FEISTY_MEOW_LOADING_DOCK variable is not defined. This must point to the location where\n\ the generated scripts are stored. Perhaps you still need to run\n\ bootstrap_shells.sh and set up some environment variables. Please see\n\ http://feistymeow.org for more details.\n"; @@ -160,13 +160,13 @@ http://feistymeow.org for more details.\n"; #really need to use better exit codes. } -$FEISTY_MEOW_GENERATED =~ s/\\/\//g; +$FEISTY_MEOW_LOADING_DOCK =~ s/\\/\//g; $FEISTY_MEOW_SCRIPTS =~ s/\\/\//g; $FEISTY_MEOW_DIR =~ s/\\/\//g; # create our generated shells directory if it's not already there. -if (! -d $FEISTY_MEOW_GENERATED) { - mkdir $FEISTY_MEOW_GENERATED; +if (! -d $FEISTY_MEOW_LOADING_DOCK) { + mkdir $FEISTY_MEOW_LOADING_DOCK; } ############## @@ -181,14 +181,14 @@ if (-d $BINDIR) { &rebuild_script_aliases; # trash the old versions. -unlink("$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh"); +unlink("$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh"); if (length($SHELL_DEBUG)) { - printf "writing $FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh...\n"; + printf "writing $FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh...\n"; } # open the alias files to be created. -open(she, ">> $FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh"); +open(she, ">> $FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh"); # find the list of files in the scripts directory. #opendir(scripts, "$FEISTY_MEOW_SCRIPTS"); @@ -196,7 +196,7 @@ open(she, ">> $FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh"); #print "scripts: @shell_files\n"; @shell_files = (&load_file_names("$FEISTY_MEOW_SCRIPTS"), - &load_file_names("$FEISTY_MEOW_GENERATED/custom/scripts")); + &load_file_names("$FEISTY_MEOW_LOADING_DOCK/custom/scripts")); # construct aliases for items in the scripts directory. foreach $file (@shell_files) { @@ -219,11 +219,11 @@ foreach $file (@shell_files) { foreach $subfile (@subdir_files) { push(@shell_files, "$file/$subfile"); } - } elsif (-f "$FEISTY_MEOW_GENERATED/custom/scripts/$file") { + } elsif (-f "$FEISTY_MEOW_LOADING_DOCK/custom/scripts/$file") { # if we see a file in the auto-generated area that comes from the # customized scripts folder, we add it as an alias. - make_alias($file, "$FEISTY_MEOW_GENERATED/custom/scripts/"); - #print "added custom script file: $FEISTY_MEOW_GENERATED/custom/scripts/$file\n"; + make_alias($file, "$FEISTY_MEOW_LOADING_DOCK/custom/scripts/"); + #print "added custom script file: $FEISTY_MEOW_LOADING_DOCK/custom/scripts/$file\n"; } else { # if it's a regular file, we'll try to make an alias for it. the function # will only fire if the ending is appropriate for the script languages we use. diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index 5cefe785..3d72ac07 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -22,15 +22,15 @@ export ERROR_OCCURRED= # there have been no errors to start with, at least. we will set this # to non-empty if something bad happens. -if [ -z "$FEISTY_MEOW_GENERATED" ]; then - # FEISTY_MEOW_GENERATED is where the generated files are located. +if [ -z "$FEISTY_MEOW_LOADING_DOCK" ]; then + # FEISTY_MEOW_LOADING_DOCK is where the generated files are located. # this is our single entry point we can use without knowing any variables # yet in the initialization process. - export FEISTY_MEOW_GENERATED="$HOME/.zz_auto_gen" + export FEISTY_MEOW_LOADING_DOCK="$HOME/.zz_feisty_loading" #hmmm: the above is kind of a constant. that's not so great. # make sure our main variables are established. - GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_GENERATED/fmc_variables.sh" + GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_LOADING_DOCK/fmc_variables.sh" if [ ! -f "$GENERATED_FEISTY_MEOW_VARIABLES" ]; then echo -e '\n\n' echo "Feisty meow scripts need initialization via the bootstrap process, e.g.:" @@ -90,7 +90,7 @@ if [ -z "$LIGHTWEIGHT_INIT" ]; then if [ ! -z "$SHELL_DEBUG" ]; then echo "the aliases were missing, now they are being added..." fi - source "$FEISTY_MEOW_GENERATED/fmc_core_and_custom_aliases.sh" + source "$FEISTY_MEOW_LOADING_DOCK/fmc_core_and_custom_aliases.sh" fi # allow connections to our x server from the local host. diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index 1da2546b..ad39a8f9 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -94,14 +94,29 @@ if [ -z "$NECHUNG" ]; then define_yeti_variable FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_SCRIPTS" fi fi - + + # set up the top-level for all build creations and logs and such. + if [ -z "$GENERATED_DIR" ]; then + define_yeti_variable GENERATED_DIR="$TMP/generated-feisty_meow" + fi + if [ ! -d "$GENERATED_DIR" ]; then + mkdir -p "$GENERATED_DIR" + fi + # set up our effluent outsourcing valves. + if [ -z "$TEMPORARIES_DIR" ]; then + define_yeti_variable TEMPORARIES_DIR="$GENERATED_DIR/temporaries" + fi + if [ ! -d "$TEMPORARIES_DIR" ]; then + mkdir -p "$TEMPORARIES_DIR" + fi + # similarly, make sure we have someplace to look for our generated files, if # we were not handed a value. - if [ -z "$FEISTY_MEOW_GENERATED" ]; then + if [ -z "$FEISTY_MEOW_LOADING_DOCK" ]; then # The generated scripts directory is where automatically generated files live. # It is separate from the main body of the shell scripts in order to keep things from # exploding. - define_yeti_variable FEISTY_MEOW_GENERATED=$HOME/.zz_auto_gen + define_yeti_variable FEISTY_MEOW_LOADING_DOCK=$HOME/.zz_feisty_loading fi ############## @@ -207,7 +222,7 @@ if [ -z "$NECHUNG" ]; then # add to the PATH variables used for locating applications. this step is taken after any # potential overrides from the user. - define_yeti_variable PATH="$(dos_to_unix_path $FEISTY_MEOW_GENERATED):$PATH:$(find /usr/local/games -maxdepth 1 -type d -exec echo -n {}: ';' 2>/dev/null)/sbin" + define_yeti_variable PATH="$(dos_to_unix_path $FEISTY_MEOW_LOADING_DOCK):$PATH:$(find /usr/local/games -maxdepth 1 -type d -exec echo -n {}: ';' 2>/dev/null)/sbin" ############## @@ -226,7 +241,7 @@ fi # override individual variables and definitions. we also don't guard this # to avoid running it again, because we don't know what mix of functions and # aliases they want to define in there. -for i in $FEISTY_MEOW_GENERATED/custom/*.sh; do +for i in $FEISTY_MEOW_LOADING_DOCK/custom/*.sh; do if [ ! -f "$i" ]; then # skip it if it's not real. continue; diff --git a/scripts/generator/bootstrap_build.sh b/scripts/generator/bootstrap_build.sh index 7a9e08c1..aae94702 100644 --- a/scripts/generator/bootstrap_build.sh +++ b/scripts/generator/bootstrap_build.sh @@ -58,7 +58,7 @@ function prepare_binaries_dir() # we'll store binaries here from the bootstrap process. if [ ! -d "$CLAM_BINARY_DIR" ]; then echo "creating binary dir now in $CLAM_BINARY_DIR" - mkdir "$CLAM_BINARY_DIR" + mkdir -p "$CLAM_BINARY_DIR" fi if [ ! -f "$CLAM_BINARY_DIR/paths.ini" ]; then echo "copied paths.ini to binary dir." diff --git a/scripts/generator/build_variables.sh b/scripts/generator/build_variables.sh index 182dd8de..7c0a850a 100644 --- a/scripts/generator/build_variables.sh +++ b/scripts/generator/build_variables.sh @@ -101,16 +101,16 @@ export BUILD_TOP="$FEISTY_MEOW_DIR" # code needed to produce the executables for feisty meow. export PRODUCTION_DIR="$BUILD_TOP/production" -# set up the top-level for all build creations and logs and such. -export GENERATED_DIR="$TMP/generated-feisty_meow" -if [ ! -d "$GENERATED_DIR" ]; then - mkdir -p "$GENERATED_DIR" -fi -# set up our effluent outsourcing valves. -export TEMPORARIES_DIR="$GENERATED_DIR/temporaries" -if [ ! -d "$TEMPORARIES_DIR" ]; then - mkdir -p "$TEMPORARIES_DIR" -fi +## set up the top-level for all build creations and logs and such. +#export GENERATED_DIR="$TMP/generated-feisty_meow" +#if [ ! -d "$GENERATED_DIR" ]; then +# mkdir -p "$GENERATED_DIR" +#fi +## set up our effluent outsourcing valves. +#export TEMPORARIES_DIR="$GENERATED_DIR/temporaries" +#if [ ! -d "$TEMPORARIES_DIR" ]; then +# mkdir -p "$TEMPORARIES_DIR" +#fi # this variable points at a folder where we store the generated products of # the build, such as the binaries and installer packages. diff --git a/scripts/generator/whack_build.sh b/scripts/generator/whack_build.sh index 82812e93..10968823 100644 --- a/scripts/generator/whack_build.sh +++ b/scripts/generator/whack_build.sh @@ -21,27 +21,25 @@ function whack_single_build_area() fi #old export NEW_TMP="$(mktemp -d "$CLEANING_LOCALE/TEMPS.XXXXXX")" - export NEW_TMP="$(mktemp -d "$TMP/temps-build-whacking.XXXXXX")" - export CRUDFILE="$(mktemp "$NEW_TMP/whack_build.XXXXXX")" + export CRUDFILE="$(mktemp "$TMP/zz_whack_build.XXXXXX")" echo "" &>"$CRUDFILE" - CLEANING_TOP="$CLEANING_LOCALE/production" +# CLEANING_TOP="$CLEANING_LOCALE/production" # echo $(date): " cleaning up the build products..." - # avoid accidentally removing way too much important stuff if our variables have not - # been previously established. - local GENERATED_DIR="$CLEANING_TOP/generated-feisty_meow" -#*** hmmm: above is wrong place now! - local TEMPORARIES_DIR="$CLEANING_TOP/temporaries" + # avoid accidentally removing important stuff if our variables have not been previously + # established. + if [ -z "$GENERATED_DIR" -o -z "$TEMPORARIES_DIR" ]; then + echo The build whacking script cannot run because either the GENERATED_DIR + echo variable or the TEMPORARIES_DIR variable have not been set. This makes + echo it unsafe to remove anything in the build products. + exit 1 + fi - # kerzap. the few cleanups in production directory remove older locations of generated files. + # kerzap. the cleanups in production directory remove older locations of generated files. rm -rf \ "$FEISTY_MEOW_DIR/generatedJUnitFiles" \ - "$CLEANING_TOP/binaries" \ - "$CLEANING_TOP/install" \ - "$CLEANING_TOP/logs" \ - "$CLEANING_TOP/objects" \ "$TEMPORARIES_DIR" \ "$GENERATED_DIR" \ "$CLEANING_TOP/__build_"*.h \ @@ -60,7 +58,7 @@ function whack_single_build_area() fi echo $(date): "cleaned [$choprepo]." - rm -rf "$NEW_TMP" + rm -rf "$CRUDFILE" return 0 } diff --git a/scripts/makefile b/scripts/makefile index 8d811f83..2d297116 100644 --- a/scripts/makefile +++ b/scripts/makefile @@ -11,12 +11,12 @@ include rules.def regenerate: @echo regenerating aliases. echo "FEISTY_MEOW_SCRIPTS = $(FEISTY_MEOW_SCRIPTS)" - echo "FEISTY_MEOW_GENERATED = $(FEISTY_MEOW_GENERATED)" - $(CATCHER)'if [ ! -d $(FEISTY_MEOW_GENERATED) ]; then mkdir $(FEISTY_MEOW_GENERATED); fi' + echo "FEISTY_MEOW_LOADING_DOCK = $(FEISTY_MEOW_LOADING_DOCK)" + $(CATCHER)'if [ ! -d $(FEISTY_MEOW_LOADING_DOCK) ]; then mkdir -p $(FEISTY_MEOW_LOADING_DOCK); fi' $(CATCHER)perl $(FEISTY_MEOW_SCRIPTS)/core/generate_aliases.pl $(CATCHER)'(export LIGHTWEIGHT_INIT=true; source $(FEISTY_MEOW_SCRIPTS)/core/launch_feisty_meow.sh; perl $(FEISTY_MEOW_SCRIPTS)/text/new_sig.pl)' clean_generated: @echo removing generated aliases. - $(CATCHER)'if [ -d $(FEISTY_MEOW_GENERATED) ]; then \rm -rf $(FEISTY_MEOW_GENERATED); fi' + $(CATCHER)'if [ -d $(FEISTY_MEOW_LOADING_DOCK) ]; then \rm -rf $(FEISTY_MEOW_LOADING_DOCK); fi' diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index a38d22a8..068bd66d 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -16,7 +16,7 @@ if [[ "$TMP" =~ .:.* ]]; then export TMP=/tmp/rev_control_$USER fi if [ ! -d "$TMP" ]; then - mkdir $TMP + mkdir -p $TMP fi if [ ! -d "$TMP" ]; then echo "Could not create the temporary directory TMP in: $TMP" diff --git a/scripts/system/osx_cd_mounter.sh b/scripts/system/osx_cd_mounter.sh index a1d522c0..7f5cc8ce 100644 --- a/scripts/system/osx_cd_mounter.sh +++ b/scripts/system/osx_cd_mounter.sh @@ -11,7 +11,7 @@ echo "$(date_stringer): starting cd mounter..." while true; do if [ ! -d $mountpoint ]; then - mkdir $mountpoint + mkdir -p $mountpoint fi found_device=$(mount|grep -i cddafs) diff --git a/scripts/text/smoove_lists.sh b/scripts/text/smoove_lists.sh index aea57995..01dbd225 100644 --- a/scripts/text/smoove_lists.sh +++ b/scripts/text/smoove_lists.sh @@ -43,7 +43,7 @@ find . -maxdepth 1 -mindepth 1 -type d >"$tempfile" while read found; do # make a corresponding directory if there isn't one yet. if [ ! -d "$target/$found" ]; then - mkdir "$target/$found" + mkdir -p "$target/$found" fi # move all the files out of the source and into the target. mv "$found"/* "$target/$found/" -- 2.34.1