removed concept of LIGHTWEIGHT_INIT
authorChris Koeritz <fred@gruntose.com>
Sat, 4 Feb 2017 03:57:21 +0000 (22:57 -0500)
committerChris Koeritz <fred@gruntose.com>
Sat, 4 Feb 2017 03:57:21 +0000 (22:57 -0500)
this flag used to keep aliases and functions out of the startup, but this is problematic; most of the time we want our own macros and functions to be visible, and they don't really cost a lot anyhow.  so, dropping the flag entirely, which is nice; cleans up a few conditional areas.

infobase/configuration/cron/aa_cron_defaults.crontab
infobase/configuration/cron/nechung_fortune.crontab
infobase/configuration/cron/opensim_restart.crontab
infobase/configuration/cron/process_check.crontab
infobase/configuration/cron/random_sound.crontab
infobase/configuration/cron/synch_and_swim_downstream.crontab
scripts/core/create_tempdir.sh
scripts/core/launch_feisty_meow.sh
scripts/customize/fred/refred.sh
scripts/makefile
scripts/system/naive_system_updater.sh [new file with mode: 0644]

index fb40e2d0afed2991794b8363b0579b2653c6b6a1..41015fdc909b4fb41453a9a4faf5836b9f2b71c1 100644 (file)
@@ -61,6 +61,6 @@ USER=fred
 # runs every minute and recreates a fortune for thunderbird signature.
 # a lot of the detail below is to get the feisty meow environment loaded for
 # the new_sig command.
-* * * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; perl $HOME/feisty_meow/scripts/text/new_sig.pl) &>>/tmp/${USER}-cron-nechung_fortune.log
+* * * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; perl $HOME/feisty_meow/scripts/text/new_sig.pl) &>>/tmp/${USER}-cron-nechung_fortune.log
 
 
index b87eb9170af383ad990a5fdb3eead7e8086845f8..b220c2de017684ab369989b328290a145d8cb5f3 100644 (file)
@@ -3,5 +3,5 @@
 # runs every minute and recreates a fortune for thunderbird signature.
 # a lot of the detail below is to get the feisty meow environment loaded for
 # the new_sig command.
-* * * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; perl $HOME/feisty_meow/scripts/text/new_sig.pl) &>>/tmp/${USER}-cron-nechung_fortune.log
+* * * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; perl $HOME/feisty_meow/scripts/text/new_sig.pl) &>>/tmp/${USER}-cron-nechung_fortune.log
 
index 8a91afbf3e8b99a5c47665c2a5ba4800f2863357..8dc3ab0aa84cc53c1044c9882bd2fc49f958f0b4 100644 (file)
@@ -1,5 +1,5 @@
 
 #[opensim restart]
 # ensure opensim is started if we can't detect it as running.
-*/5 * * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/opensim/maybe_restart_opensim.sh) &>>/tmp/${USER}-cron-opensim_restart.log 
+*/5 * * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/opensim/maybe_restart_opensim.sh) &>>/tmp/${USER}-cron-opensim_restart.log 
 
index 131df39c81143b9b81f6f51d5ae5d7f02baaae41..b88350d85c8a99cc18d494e9065db064eb8c3897 100644 (file)
@@ -1,5 +1,5 @@
 
 #[process check]
 # a crontab for periodically dumping the process state.
-* * * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/processes/show_hot_ones.sh) &>>/tmp/${USER}-cron-active_processes.log 
+* * * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/processes/show_hot_ones.sh) &>>/tmp/${USER}-cron-active_processes.log 
 
index 106dbf972011a658f6188cf6563d830146dd3304..144e077854eeb59aea5eb1d0782ef5254b7b9930 100644 (file)
@@ -1,4 +1,4 @@
 
 #[random sound]
-* * * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/multimedia/randomly_play.sh) &>>/tmp/${USER}-cron-random_sound.log
+* * * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/multimedia/randomly_play.sh) &>>/tmp/${USER}-cron-random_sound.log
 
index c596a3fd71099516ff2084cf2f55bc393779beda..f4fee1340c6b083c884557a342ea0d835fcf7acd 100644 (file)
@@ -4,5 +4,5 @@
 # repositories, such as sourceforge or github.  the uploading process (which we think of as sending
 # those updated items swimming downstream to their dependent repositories) is done automatically in
 # our makefiles.  that's why the code below relies on the top-level makefile in home.
-14 3 * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; cd $HOME ; rev_update ; make ) &>>/tmp/${USER}-cron-synch_and_swim_downstream.log
+14 3 * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; cd $HOME ; rev_update ; make ) &>>/tmp/${USER}-cron-synch_and_swim_downstream.log
 
index 5d3a5b2f1f451a888c1f00249601ff6ebded60a5..e4fd53d62b96d2910c0eb355e85f510c6b810b04 100644 (file)
@@ -26,9 +26,7 @@ if [ ! -d "$TMP" ]; then
     echo "failed to chown $TMP to user's ownership."
   fi
 fi
-if [ -z "$LIGHTWEIGHT_INIT" ]; then
-  echo "$word transient area \"$TMP\" for $USER on $(date_stringer)." >>$LOG_FILE
-fi
+echo "$word transient area \"$TMP\" for $USER on $(date_stringer)." >>$LOG_FILE
 
 # set other temporary variables to the same place as TMP.
 export TEMP=$TMP
index fbd999bb714ecaba45ce705f5160ca4fd72d8b59..70b1b0cafa0c26654b74526c4259200d2eba0bbe 100644 (file)
@@ -92,28 +92,26 @@ fi
 
 ##############
 
-if [ -z "$LIGHTWEIGHT_INIT" ]; then
-  # perform the bulkier parts of the initialization process.
-
-  if [ ! -z "$SHELL_DEBUG" ]; 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
-      echo "the aliases were missing, now they are being added..."
-    fi
-    source "$FEISTY_MEOW_LOADING_DOCK/fmc_core_and_custom_aliases.sh"
+# perform the bulkier parts of the initialization process.
+
+if [ ! -z "$SHELL_DEBUG" ]; 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
+    echo "the aliases were missing, now they are being added..."
   fi
+  source "$FEISTY_MEOW_LOADING_DOCK/fmc_core_and_custom_aliases.sh"
+fi
 
 #echo before the new labelling, terminal titles have:
 #show_terminal_titles
 
-  # a minor tickle of the title of the terminal, unless we already have some history.
-  label_terminal_with_info
+# 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
-fi
+if [ ! -z "$SHELL_DEBUG" ]; then echo "heavyweight init is done."; fi
 
 if [ -z "$ERROR_OCCURRED" ]; then
   # set a sentinel variable to say we loaded the feisty meow environment.
index 8d951919b0b671905e728b7314fbda99c1c38be0..e8f07489f98fd17d96e9a4c3ec6c76123f2b5cd6 100644 (file)
@@ -11,7 +11,6 @@ function refred()
 # than when it's just being sourced.
 if [[ $0 =~ .*refred\.sh.* ]]; then
   THISDIR="$( \cd "$(\dirname "$0")" && /bin/pwd )"
-  export LIGHTWEIGHT_INIT=true
   source "$THISDIR/../../core/launch_feisty_meow.sh"
   refred
 fi
index 4a5dbc10d827a5619d1ce245a5eda4da219ebdd4..773fea686e970631d9692b6bf1d6053db0a26a39 100644 (file)
@@ -14,6 +14,6 @@ regenerate:
        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)'
+       $(CATCHER)'(source $(FEISTY_MEOW_SCRIPTS)/core/launch_feisty_meow.sh; perl $(FEISTY_MEOW_SCRIPTS)/text/new_sig.pl)'
 
 
diff --git a/scripts/system/naive_system_updater.sh b/scripts/system/naive_system_updater.sh
new file mode 100644 (file)
index 0000000..a68ff69
--- /dev/null
@@ -0,0 +1,10 @@
+
+# load feisty meow aliases.
+source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh
+
+sudo apt-get update -y
+check_result "problem while doing 'apt-get update'"
+sudo apt-get dist-upgrade -y
+check_result "problem while doing 'apt-get dist-upgrade'"
+
+