From: Chris Koeritz Date: Sun, 12 Nov 2017 23:33:35 +0000 (-0500) Subject: Merge branch 'dev' of feistymeow.org:feisty_meow into dev X-Git-Tag: 2.140.98^2~4^2~2 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=ccf15a3d7de87085bbdbb2f1f3aa21f58324a045;hp=12c7752f13fe489f6d0f2d7fe484c881907b92d5;p=feisty_meow.git Merge branch 'dev' of feistymeow.org:feisty_meow into dev --- diff --git a/scripts/archival/general_updater.sh b/scripts/archival/general_updater.sh index d03307fc..918671d8 100644 --- a/scripts/archival/general_updater.sh +++ b/scripts/archival/general_updater.sh @@ -11,6 +11,7 @@ source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" function update_source_folders() { folder="$1"; shift + sep if [ ! -d "$folder" ]; then echo "The folder '$folder' does not exist, so skipping repository update there." return; @@ -27,6 +28,7 @@ function update_source_folders() return 1 fi popd + sep } # this attempts to copy all the contents in a folder called "from" into a folder @@ -40,12 +42,12 @@ function synch_directory_to_target() sep if [ ! -d "$from" ]; then - echo "skipping synch on missing source directory $from; this is not normal!" - return 1 + echo "skipping synch on missing source directory: ${from}" + return 0 fi if [ ! -d "$to" ]; then - echo "skipping synch into non-existent directory $to" - return + echo "skipping synch into non-existent target directory $to" + return 0 fi echo "synching from $from into $to" @@ -92,6 +94,8 @@ function update_archive_drive() echo successfully updated all expected portions of the target drive at: echo " $target_folder" + echo + popd } diff --git a/scripts/core/common.alias b/scripts/core/common.alias index 7526c8a9..fae1b6c6 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -142,7 +142,7 @@ unalias feistyme &>/dev/null ############## # set the sentinel alias that says this file was handled. -alias CORE_ALIASES_LOADED=true +#alias CORE_ALIASES_LOADED=true ############## diff --git a/scripts/core/generate_aliases.pl b/scripts/core/generate_aliases.pl index ae7ea3e7..a9b77747 100644 --- a/scripts/core/generate_aliases.pl +++ b/scripts/core/generate_aliases.pl @@ -152,10 +152,14 @@ Please see http://feistymeow.org for more details.\n"; #really need to use better exit codes. } +############## + $FEISTY_MEOW_LOADING_DOCK =~ s/\\/\//g; $FEISTY_MEOW_SCRIPTS =~ s/\\/\//g; $FEISTY_MEOW_APEX =~ s/\\/\//g; +############## + # create our generated shells directory if it's not already there. if (! -d $FEISTY_MEOW_LOADING_DOCK) { mkdir $FEISTY_MEOW_LOADING_DOCK; @@ -168,10 +172,14 @@ if (-d $FEISTY_MEOW_BINARIES) { system("chmod -R u+x \"$FEISTY_MEOW_BINARIES\"/*"); } +############## + # generate the first set of alias files that are defined in the core # and custom scripts directories. &rebuild_script_aliases; +############## + # trash the old versions. unlink("$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh"); @@ -179,6 +187,8 @@ if (length($DEBUG_FEISTY_MEOW)) { printf "writing $FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh...\n"; } +############## + # open the alias files to be created. open(she, ">> $FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh"); @@ -217,4 +227,18 @@ foreach $file (@shell_files) { close(she); +############## + +# prepare a finalizer chunk that is the last thing to load. + +open(she, ">> $FEISTY_MEOW_LOADING_DOCK/fmc_ending_sentinel.sh"); + +# write in our sentinel alias that says alias loading was handled. +print she "define_yeti_alias CORE_ALIASES_LOADED=true\n"; + +close(she); + +############## + 1; + diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index 3c3cd691..fc50921c 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -122,9 +122,8 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then fi ############## - + if [ -z "$ERROR_OCCURRED" ]; then - # pull in our generated variables that are the minimal set we need to find # the rest of our resources. source "$FEISTY_MEOW_VARIABLES_LOADING_FILE" @@ -138,10 +137,9 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then ############## if [ -z "$ERROR_OCCURRED" ]; then - - # load the larger body of standard feisty meow variables into the environment. - # we actually want this to always run also; it will decide what variables need - # to be set again. + # no error occurred in our tests above, so load the larger body of standard feisty + # meow variables into the environment. we actually want this to always run also; + # it will decide what variables need to be set again. source "$FEISTY_MEOW_SCRIPTS/core/variables.sh" ############## @@ -156,6 +154,7 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then ############## +#hmmm: abstract this to a twiddle shell options method. # check hash table before searching path. shopt -s checkhash # don't check path for sourced files. @@ -188,9 +187,7 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "the aliases were missing, now they are being added..." fi -echo HEEE HAHAHAHAHA source "$FEISTY_MEOW_LOADING_DOCK/fmc_core_and_custom_aliases.sh" -echo HOOOOEY fi #echo before the new labelling, terminal titles have: @@ -218,5 +215,8 @@ echo HOOOOEY unset FEISTY_MEOW_SHOW_LAUNCH_GREETING fi + # load the last bits we do here. + source "$FEISTY_MEOW_LOADING_DOCK/fmc_ending_sentinel.sh" + fi # "$NO_REPAIRS_NEEDED" was == "true" diff --git a/scripts/customize/fred/fred_common.alias b/scripts/customize/fred/fred_common.alias index 7bd8621e..37b085e4 100644 --- a/scripts/customize/fred/fred_common.alias +++ b/scripts/customize/fred/fred_common.alias @@ -2,11 +2,6 @@ # some aliases that i don't expect very many people to ever want. # these are very specific to drives and such that i use but which other people wouldn't. -echo "got to alias additions in fred_common.alias!!!" - -#### pull in any code dependencies. -###source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh" - # updates the mounted barkuptree drive with stuff on wildmutt. define_yeti_alias update_barkuptree='source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh"; update_archive_drive "/media/fred/barkuptreedrive"' @@ -19,7 +14,6 @@ define_yeti_alias update_fredmusicprime='source "$FEISTY_MEOW_SCRIPTS/archival/g # updates my little 1 TB "soapbox" style usb drive with any appropriate archives and source. define_yeti_alias update_soapbox='source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh"; update_archive_drive "/media/fred/soapboxdrive"' - # moo and unmoo mount the local folders i use most. #no longer used. we are doing mostly full directory stores without nfs mounts these days. #define_yeti_alias moo='check_mount /z/stuffing ; check_mount /z/walrus ; check_mount /z/chunky ; check_mount /z/fredgrid' @@ -29,3 +23,4 @@ define_yeti_alias update_soapbox='source "$FEISTY_MEOW_SCRIPTS/archival/general_ # not currently used. this probably was adding a bit of startup time. #source "$FEISTY_MEOW_SCRIPTS/buildor/gffs_builders.sh" +