From: Chris Koeritz Date: Sat, 4 Feb 2017 03:57:21 +0000 (-0500) Subject: removed concept of LIGHTWEIGHT_INIT X-Git-Tag: 2.140.90~230 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=9fd687b2a9082cc5ce244f779d3f259ea6753216;p=feisty_meow.git removed concept of LIGHTWEIGHT_INIT 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. --- diff --git a/infobase/configuration/cron/aa_cron_defaults.crontab b/infobase/configuration/cron/aa_cron_defaults.crontab index fb40e2d0..41015fdc 100644 --- a/infobase/configuration/cron/aa_cron_defaults.crontab +++ b/infobase/configuration/cron/aa_cron_defaults.crontab @@ -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 diff --git a/infobase/configuration/cron/nechung_fortune.crontab b/infobase/configuration/cron/nechung_fortune.crontab index b87eb917..b220c2de 100644 --- a/infobase/configuration/cron/nechung_fortune.crontab +++ b/infobase/configuration/cron/nechung_fortune.crontab @@ -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 diff --git a/infobase/configuration/cron/opensim_restart.crontab b/infobase/configuration/cron/opensim_restart.crontab index 8a91afbf..8dc3ab0a 100644 --- a/infobase/configuration/cron/opensim_restart.crontab +++ b/infobase/configuration/cron/opensim_restart.crontab @@ -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 diff --git a/infobase/configuration/cron/process_check.crontab b/infobase/configuration/cron/process_check.crontab index 131df39c..b88350d8 100644 --- a/infobase/configuration/cron/process_check.crontab +++ b/infobase/configuration/cron/process_check.crontab @@ -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 diff --git a/infobase/configuration/cron/random_sound.crontab b/infobase/configuration/cron/random_sound.crontab index 106dbf97..144e0778 100644 --- a/infobase/configuration/cron/random_sound.crontab +++ b/infobase/configuration/cron/random_sound.crontab @@ -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 diff --git a/infobase/configuration/cron/synch_and_swim_downstream.crontab b/infobase/configuration/cron/synch_and_swim_downstream.crontab index c596a3fd..f4fee134 100644 --- a/infobase/configuration/cron/synch_and_swim_downstream.crontab +++ b/infobase/configuration/cron/synch_and_swim_downstream.crontab @@ -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 diff --git a/scripts/core/create_tempdir.sh b/scripts/core/create_tempdir.sh index 5d3a5b2f..e4fd53d6 100644 --- a/scripts/core/create_tempdir.sh +++ b/scripts/core/create_tempdir.sh @@ -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 diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index fbd999bb..70b1b0ca 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -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. diff --git a/scripts/customize/fred/refred.sh b/scripts/customize/fred/refred.sh index 8d951919..e8f07489 100644 --- a/scripts/customize/fred/refred.sh +++ b/scripts/customize/fred/refred.sh @@ -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 diff --git a/scripts/makefile b/scripts/makefile index 4a5dbc10..773fea68 100644 --- a/scripts/makefile +++ b/scripts/makefile @@ -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 index 00000000..a68ff692 --- /dev/null +++ b/scripts/system/naive_system_updater.sh @@ -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'" + +