From 6c098e82fd059487b6097d31cdf8e199de7d792e Mon Sep 17 00:00:00 2001 From: "Fred T. Hamster" Date: Sat, 4 Feb 2012 14:28:56 -0500 Subject: [PATCH] moving custom directory to under generated folder --- scripts/core/bootstrap_shells.sh | 5 ++++- scripts/core/common.alias | 6 ++++-- scripts/core/generate_aliases.pl | 6 +++--- scripts/core/launch_feisty_meow.sh | 4 ++-- scripts/core/unter_alia.sh | 7 ++++--- scripts/core/variables.sh | 2 +- scripts/custom/.gitignore | 6 ------ scripts/examples/custom_overrides/fred/fred_common.alias | 4 ---- scripts/examples/custom_overrides/readme.txt | 3 +-- 9 files changed, 19 insertions(+), 24 deletions(-) delete mode 100644 scripts/custom/.gitignore diff --git a/scripts/core/bootstrap_shells.sh b/scripts/core/bootstrap_shells.sh index 75c4fb4a..3d128889 100644 --- a/scripts/core/bootstrap_shells.sh +++ b/scripts/core/bootstrap_shells.sh @@ -29,9 +29,12 @@ fi if [ ! -d "$FEISTY_MEOW_GENERATED" ]; then mkdir "$FEISTY_MEOW_GENERATED" fi +if [ ! -d "$FEISTY_MEOW_GENERATED/custom" ]; then + mkdir "$FEISTY_MEOW_GENERATED/custom" +fi # just a variable we use in here to refer to the generated variables file. -GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_GENERATED/feisty_meow_variables.sh" +GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_GENERATED/fmc_variables.sh" # create the alias file as totally blank. echo -n >"$GENERATED_FEISTY_MEOW_VARIABLES" for i in FEISTY_MEOW_DIR FEISTY_MEOW_SCRIPTS FEISTY_MEOW_GENERATED; do diff --git a/scripts/core/common.alias b/scripts/core/common.alias index df70f1c0..7429ed35 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -31,6 +31,8 @@ alias path='echo $PATH' alias play='bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh' alias rmdir='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl' alias rd='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl' +# redoes fred's set of custom scripts. +alias recustomize='cpdiff $FEISTY_MEOW_SCRIPTS/examples/custom_overrides/fred $FEISTY_MEOW_GENERATED/custom' #regen-- this might be better as a function. alias regenerate='bash $FEISTY_MEOW_SCRIPTS/core/bootstrap_shells.sh ; echo ; nechung' alias reroot='chown -R root:root /root' @@ -68,9 +70,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/aliases_for_scripts.sh" ]; then +if [ -f "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh" ]; then if [ ! -z "$SHELL_DEBUG" ]; then echo launching generated aliases.; fi - source "$FEISTY_MEOW_GENERATED/aliases_for_scripts.sh" + source "$FEISTY_MEOW_GENERATED/fmc_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 94d5f519..343df735 100644 --- a/scripts/core/generate_aliases.pl +++ b/scripts/core/generate_aliases.pl @@ -103,12 +103,12 @@ system("bash \"$FEISTY_MEOW_SCRIPTS\"/core/unter_alia.sh"); # and custom scripts directories. # trash the old versions. -unlink("$FEISTY_MEOW_GENERATED/aliases_for_scripts.sh"); +unlink("$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh"); -printf "writing $FEISTY_MEOW_GENERATED/aliases_for_scripts.sh...\n"; +printf "writing $FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh...\n"; # open the alias files to be created. -open(she, ">> $FEISTY_MEOW_GENERATED/aliases_for_scripts.sh"); +open(she, ">> $FEISTY_MEOW_GENERATED/fmc_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 581b950e..c229bebf 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -26,7 +26,7 @@ if [ ! -z "$WINDIR" -o ! -z "$windir" ]; then fi # make sure our main variables are established. -GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_GENERATED/feisty_meow_variables.sh" +GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_GENERATED/fmc_variables.sh" if [ ! -f "$GENERATED_FEISTY_MEOW_VARIABLES" ]; then echo -e '\n\n' echo "The yeti scripts need to be initialized via the bootstrap process, e.g.:" @@ -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/core_and_custom_aliases.sh" + source "$FEISTY_MEOW_GENERATED/fmc_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 9fa72eb1..428ece0b 100644 --- a/scripts/core/unter_alia.sh +++ b/scripts/core/unter_alia.sh @@ -5,7 +5,8 @@ # The "common.alias" file is used in the generated aliases file as a base # set of generally useful aliases. We also add aliases for any script files # (perl, bash, python, etc) that we find in the feisty meow script hierarchy. -# Any *.alias files found in the scripts/custom folder are loaded also. +# Any *.alias files found in the $FEISTY_MEOW_GENERATED/custom folder are +# loaded also. if [ ! -z "$SHELL_DEBUG" ]; then echo rebuiling generated aliases file...; fi @@ -19,7 +20,7 @@ test_color=$(ls --help 2>&1 | grep -i color) ALIAS_DEFINITION_FILES=("$FEISTY_MEOW_SCRIPTS/core/common.alias") # if custom aliases files exist, add them to the list. -for i in "$FEISTY_MEOW_SCRIPTS/custom/*.alias"; do +for i in "$FEISTY_MEOW_GENERATED/custom/*.alias"; do ALIAS_DEFINITION_FILES+=("$i") done echo "alias files:" @@ -29,7 +30,7 @@ done # write the aliases for sh and bash scripts. -GENERATED_ALIAS_FILE="$FEISTY_MEOW_GENERATED/core_and_custom_aliases.sh" +GENERATED_ALIAS_FILE="$FEISTY_MEOW_GENERATED/fmc_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, diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index 3a26777f..36069c07 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -85,7 +85,7 @@ fi ############################################################################## # pull in the custom overrides for feisty_meow scripts. -for i in $FEISTY_MEOW_SCRIPTS/custom/*.sh; do +for i in $FEISTY_MEOW_GENERATED/custom/*.sh; do if [ ! -z "$SHELL_DEBUG" ]; then echo "loading customization: $(basename $(dirname $i))/$(basename $i)" fi diff --git a/scripts/custom/.gitignore b/scripts/custom/.gitignore deleted file mode 100644 index fad69f8d..00000000 --- a/scripts/custom/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ - -# ignore anything in this directory, since it's not public. - -[^.]* - - diff --git a/scripts/examples/custom_overrides/fred/fred_common.alias b/scripts/examples/custom_overrides/fred/fred_common.alias index 8ca374f2..3a372ea1 100644 --- a/scripts/examples/custom_overrides/fred/fred_common.alias +++ b/scripts/examples/custom_overrides/fred/fred_common.alias @@ -9,8 +9,4 @@ alias unmoo='umount /z/stuffing ; umount /z/walrus ; umount /z/chunky ' # cleans up the ownership for all my files. alias refred='(chown -R fred:fred /home/fred /usr/local/games /home/archives /fatty /clutterato /var/spool/mail/fred ; normal_perm /var/log )' -# redoes my custom scripts. kind of a bummer if i mistakenly made -# modifications in the un-saved custom directory itself. -alias recustomize='cpdiff $FEISTY_MEOW_SCRIPTS/examples/custom_overrides/fred $FEISTY_MEOW_SCRIPTS/custom' - diff --git a/scripts/examples/custom_overrides/readme.txt b/scripts/examples/custom_overrides/readme.txt index 92bb3023..554f9278 100644 --- a/scripts/examples/custom_overrides/readme.txt +++ b/scripts/examples/custom_overrides/readme.txt @@ -7,6 +7,5 @@ and it can also have shell scripts that are sourced into the main-line of script initialization (any files ending in .sh). when you have some custom scripts you want to use, copy them from your own -folder to the scripts/custom directory. be careful though, because they -will never be checked into the repository from there. +folder to the $FEISTY_MEOW_GENERATED/custom directory. -- 2.34.1