From: Chris Koeritz Date: Mon, 13 Feb 2012 14:43:39 +0000 (-0500) Subject: cleaned up some logging. X-Git-Tag: 2.140.90~1608 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=73762077041da828b24ffb9993bae49267f02507;p=feisty_meow.git cleaned up some logging. --- diff --git a/examples/custom_overrides/fred/java_profile.sh b/examples/custom_overrides/fred/java_profile.sh index 50e2c290..0f25a7ac 100644 --- a/examples/custom_overrides/fred/java_profile.sh +++ b/examples/custom_overrides/fred/java_profile.sh @@ -11,7 +11,9 @@ function intuition_failure() { missing="$1"; shift - echo "Could not intuit '$missing' variable." + if [ ! -z "$SHELL_DEBUG" ]; then + echo "Could not intuit '$missing' variable." + fi # remove the variable because its value is busted. unset $missing } diff --git a/scripts/core/bootstrap_shells.sh b/scripts/core/bootstrap_shells.sh index 40836154..ded1cf9a 100644 --- a/scripts/core/bootstrap_shells.sh +++ b/scripts/core/bootstrap_shells.sh @@ -45,8 +45,8 @@ source "$FEISTY_MEOW_SCRIPTS/core/variables.sh" # create our common aliases. perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl" -echo ========================================== -echo Established this set of variables to describe how to find feisty_meow assets: +echo established these variables for feisty_meow assets: +echo ============== cat "$GENERATED_FEISTY_MEOW_VARIABLES" -echo ========================================== +echo ============== diff --git a/scripts/core/generate_aliases.pl b/scripts/core/generate_aliases.pl index 256be090..6662f1fb 100644 --- a/scripts/core/generate_aliases.pl +++ b/scripts/core/generate_aliases.pl @@ -85,7 +85,9 @@ sub rebuild_script_aliases { # create our generated shells directory if it's not already. if ( ! -d $FEISTY_MEOW_GENERATED ) { mkdir $FEISTY_MEOW_GENERATED; -print "made gener dir $FEISTY_MEOW_GENERATED\n"; + if (length($SHELL_DEBUG)) { + print "made FEISTY_MEOW_GENERATED at '$FEISTY_MEOW_GENERATED'\n"; + } } # test if we can use color in ls... @@ -98,17 +100,21 @@ print "made gener dir $FEISTY_MEOW_GENERATED\n"; foreach $i (&glob_list("$FEISTY_MEOW_GENERATED/custom/*.alias")) { if (-f $i) { push(@ALIAS_DEFINITION_FILES, $i); } } - print "alias files:\n"; - foreach $i (@ALIAS_DEFINITION_FILES) { - local $base_of_dir = &basename(&dirname($i)); - local $basename = &basename($i); - print " $base_of_dir/$basename\n"; + if (length($SHELL_DEBUG)) { + print "using these alias files:\n"; + foreach $i (@ALIAS_DEFINITION_FILES) { + local $base_of_dir = &basename(&dirname($i)); + local $basename = &basename($i); + print " $base_of_dir/$basename\n"; + } } # write the aliases for sh and bash scripts. local $GENERATED_ALIAS_FILE = "$FEISTY_MEOW_GENERATED/fmc_core_and_custom_aliases.sh"; - print "writing generated aliases in $GENERATED_ALIAS_FILE...\n"; + if (length($SHELL_DEBUG)) { + print "writing generated aliases in $GENERATED_ALIAS_FILE...\n"; + } #hmmm: perhaps a good place for a function to create the header, # given the appropriate comment code. @@ -177,7 +183,9 @@ if (-d $BINDIR) { # trash the old versions. unlink("$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh"); -printf "writing $FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh...\n"; +if (length($SHELL_DEBUG)) { + printf "writing $FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh...\n"; +} # open the alias files to be created. open(she, ">> $FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh");