From: Chris Koeritz Date: Wed, 1 Feb 2012 14:42:51 +0000 (-0500) Subject: clean-ups, better file names. X-Git-Tag: 2.140.90~1648 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=65ceb7d51f096b446826c0ab5bdaa9550abab2c3;p=feisty_meow.git clean-ups, better file names. --- diff --git a/scripts/core/array_sifter.sh b/scripts/core/array_sifter.sh index fec3f209..aca301f6 100644 --- a/scripts/core/array_sifter.sh +++ b/scripts/core/array_sifter.sh @@ -2,6 +2,11 @@ # # Provides functions for checking and sorting the contents of arrays. + +#hmmm: these could all be beefed up by properly handling spaces in array +# entries. use "${blah[@]}" rather than '*' for getting all elems. + + # given the name of an array as the first parameter, this signals # success (return value zero) if the second parameter is found in the # array. failure (non-zero return) occurs if the item is missing. diff --git a/scripts/core/bootstrap_shells.sh b/scripts/core/bootstrap_shells.sh index a1e3cabf..75c4fb4a 100644 --- a/scripts/core/bootstrap_shells.sh +++ b/scripts/core/bootstrap_shells.sh @@ -13,21 +13,10 @@ ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && \pwd )" YETI_CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )" THIS_TOOL_NAME="$(basename "$0")" -## check this scripts directory; do we find this script there? -#pushd "/" &>/dev/null # jump to root so relative paths have to fail. -#if [ ! -f "$YETI_CORE_SCRIPTS_DIR/$THIS_TOOL_NAME" ]; then -# echo "This script must be run using its full pathname. This enables the script to" -# echo "locate the proper folders. Please try again with the full path, e.g.:" -# echo " bash /home/fred/codeplex/$THIS_TOOL_NAME" -# exit 1 -#fi -#popd &>/dev/null - # set up the feisty_meow dir. pushd "$YETI_CORE_SCRIPTS_DIR/../.." &>/dev/null export FEISTY_MEOW_DIR="$(pwd)" popd &>/dev/null -#echo feisty_meow is $FEISTY_MEOW_DIR export FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_DIR/scripts" diff --git a/scripts/core/common.alias b/scripts/core/common.alias index 2b86df46..df70f1c0 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -38,8 +38,6 @@ alias rm='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl' alias ren='\mv -v -i ' alias up='cd ..' alias whence=which -alias xterm='xterm $myxtermflags' -alias xtroff='xtroff $myxflags' #hmmm: move these to the custom area? # Standard CAK aliases that add to or extend Unix commands. @@ -70,9 +68,9 @@ alias whereami='echo whoa dude, try not to think about it...' alias why='echo just because.' # call the generated aliases file, if it exists. -if [ -f "$FEISTY_MEOW_GENERATED/p_alias.sh" ]; then +if [ -f "$FEISTY_MEOW_GENERATED/aliases_for_scripts.sh" ]; then if [ ! -z "$SHELL_DEBUG" ]; then echo launching generated aliases.; fi - source $FEISTY_MEOW_GENERATED/p_alias.sh + source "$FEISTY_MEOW_GENERATED/aliases_for_scripts.sh" if [ ! -z "$SHELL_DEBUG" ]; then echo done with generated aliases.; fi fi diff --git a/scripts/core/generate_aliases.pl b/scripts/core/generate_aliases.pl index a413d894..94d5f519 100644 --- a/scripts/core/generate_aliases.pl +++ b/scripts/core/generate_aliases.pl @@ -99,18 +99,16 @@ if (-d $BINDIR) { ############## system("bash \"$FEISTY_MEOW_SCRIPTS\"/core/unter_alia.sh"); - # generate the first set of alias files; these are the root files used - # by the shell. each of them will be written to in turn invoke the - # p_alias files which are made from the set of scripts in FEISTY_MEOW_SCRIPTS - # (see below). + # generate the first set of alias files that are defined in the core + # and custom scripts directories. # trash the old versions. -unlink("$FEISTY_MEOW_GENERATED/p_alias.sh"); +unlink("$FEISTY_MEOW_GENERATED/aliases_for_scripts.sh"); -printf "writing $FEISTY_MEOW_GENERATED/p_alias.sh...\n"; +printf "writing $FEISTY_MEOW_GENERATED/aliases_for_scripts.sh...\n"; # open the alias files to be created. -open(she, ">> $FEISTY_MEOW_GENERATED/p_alias.sh"); +open(she, ">> $FEISTY_MEOW_GENERATED/aliases_for_scripts.sh"); #print "os is $OS\n"; diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index 7c318375..581b950e 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -10,7 +10,7 @@ ############## -export SHELL_DEBUG=true +#export SHELL_DEBUG=true # this variable causes the scripts that listen to it to print more information # when they run. @@ -75,7 +75,7 @@ if [ -z "$LIGHTWEIGHT_INIT" ]; then if [ ! -z "$SHELL_DEBUG" ]; then echo the aliases were missing, now they are added... fi - source $FEISTY_MEOW_GENERATED/aliases.sh + source "$FEISTY_MEOW_GENERATED/core_and_custom_aliases.sh" fi # allow connections to our x server from the local host. diff --git a/scripts/core/unter_alia.sh b/scripts/core/unter_alia.sh index ef52bfa9..9fa72eb1 100644 --- a/scripts/core/unter_alia.sh +++ b/scripts/core/unter_alia.sh @@ -29,7 +29,7 @@ done # write the aliases for sh and bash scripts. -GENERATED_ALIAS_FILE="$FEISTY_MEOW_GENERATED/aliases.sh" +GENERATED_ALIAS_FILE="$FEISTY_MEOW_GENERATED/core_and_custom_aliases.sh" echo "writing generated aliases in $GENERATED_ALIAS_FILE..." #hmmm: perhaps a good place for a function to create the header,