Merge branch 'dev' of feistymeow.org:feisty_meow into dev
authorChris Koeritz <fred@gruntose.com>
Sun, 12 Nov 2017 23:33:35 +0000 (18:33 -0500)
committerChris Koeritz <fred@gruntose.com>
Sun, 12 Nov 2017 23:33:35 +0000 (18:33 -0500)
scripts/archival/general_updater.sh
scripts/core/common.alias
scripts/core/generate_aliases.pl
scripts/core/launch_feisty_meow.sh
scripts/customize/fred/fred_common.alias

index d03307fc018dbce033e4c51d057f4437cd44e39e..918671d8116333c436975ce9fa832b67d3230665 100644 (file)
@@ -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
 }
 
 
index 7526c8a997781f503c084f740c48b8c45909b1c7..fae1b6c6e09032d4256e9c0b6cbf01cf7c1b7baa 100644 (file)
@@ -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
 
 ##############
 
index ae7ea3e79db45eb9eb49743a5acfa7f299a9b9ad..a9b777473aac403f4889860781e19d1d5313bd89 100644 (file)
@@ -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;
+
index 3c3cd6915f098be702ae41febb16e0daa65e5536..fc50921c06c3adb2843ef01e9753e77df43f07e5 100644 (file)
@@ -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" 
 
index 7bd8621e9272b51670da01719c5a832728af0013..37b085e479a467cea50fcd90e3b180040e9dad11 100644 (file)
@@ -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"
 
+