From dbe3a7d9104352d69efdaa5eca600908ecc9bba8 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sat, 28 Jan 2012 15:56:50 -0500 Subject: [PATCH] cleaned up many variable usages, etc. --- docs/clam_manual/clam_docs.html | 10 +- docs/perl_tools.html | 4 +- scripts/archival/pack_yeti.sh | 2 +- scripts/archival/shared_snarfer.pl | 2 +- scripts/archival/snarf_yeti.pl | 2 +- scripts/buildor/buildor_strip_code.sh | 4 +- scripts/buildor/buildor_writable_code.sh | 2 +- scripts/buildor/find_one_word_comments.sh | 2 +- scripts/buildor/manifester.sh | 2 +- scripts/buildor/stdbuild.sh | 2 +- scripts/clam/variables.def | 2 +- scripts/core/bootstrap_shells.sh | 37 +++--- scripts/core/byejob.sh | 4 +- scripts/core/common.alias | 30 ++--- scripts/core/create_tempdir.sh | 2 +- scripts/core/functions.sh | 8 +- scripts/core/generate_aliases.pl | 39 +++--- scripts/core/goodbye.sh | 4 +- scripts/core/i.sh | 4 +- scripts/core/lightweight_unix_login.sh | 4 +- scripts/core/profile.sh | 18 +-- scripts/core/sh_aliases.txt | 123 ------------------ scripts/core/unix_login.sh | 14 +- scripts/core/unter_alia.sh | 79 +++++------ scripts/core/variables.sh | 32 ++--- scripts/database/backup_mysql_dbs.sh | 2 +- scripts/email/move_spams_and_check.sh | 2 +- ...{fred_common.aliases => fred_common.alias} | 0 .../{c_variables.sh => fred_variables.sh} | 0 scripts/examples/custom_overrides/readme.txt | 9 +- scripts/files/find_bad_protection.sh | 4 +- scripts/files/recursive_renlower.sh | 4 +- scripts/files/recursive_whack_dupes.sh | 2 +- scripts/makefile | 14 +- scripts/multimedia/play_random.sh | 2 +- scripts/multimedia/randomly_play.sh | 2 +- scripts/multimedia/sound_play.sh | 2 +- scripts/opensim/backup_opensim.sh | 2 +- scripts/opensim/backup_osgrid.sh | 2 +- scripts/opensim/maybe_restart_opensim.sh | 2 +- scripts/opensim/run_opensim.sh | 2 +- scripts/opensim/run_osgrid.sh | 2 +- scripts/opensim/stop_opensim.sh | 2 +- scripts/opensim/stop_osgrid.sh | 2 +- scripts/processes/pskill.sh | 2 +- scripts/rev_control/checkin.sh | 2 +- scripts/rev_control/getme.sh | 6 +- scripts/schedule/start_calendar.sh | 4 +- scripts/security/start_tunnels.sh | 4 +- scripts/security/tell_zooty_our_ip.sh | 2 +- scripts/system/osx_cd_mounter.sh | 2 +- scripts/text/smoove_lists.sh | 2 +- scripts/tty/keep_awake.sh | 2 +- scripts/tty/keep_awake_process.sh | 2 +- scripts/tty/label_terminal_with_infos.sh | 2 +- scripts/tty/lockup.sh | 2 +- scripts/tty/ssh.sh | 2 +- scripts/users/findme.sh | 2 +- 58 files changed, 194 insertions(+), 331 deletions(-) delete mode 100644 scripts/core/sh_aliases.txt rename scripts/examples/custom_overrides/fred/{fred_common.aliases => fred_common.alias} (100%) rename scripts/examples/custom_overrides/fred/{c_variables.sh => fred_variables.sh} (100%) diff --git a/docs/clam_manual/clam_docs.html b/docs/clam_manual/clam_docs.html index 8bfa888b..7e052a2c 100644 --- a/docs/clam_manual/clam_docs.html +++ b/docs/clam_manual/clam_docs.html @@ -165,7 +165,7 @@ CLAM
  • Setting environment variables for clam:
    1. -
    2. YETI_DIR:
    3. +
    4. FEISTY_MEOW_DIR:
      1. @@ -175,7 +175,7 @@ CLAM This variable has been needed since clam became part of the YETIcode project (at http://yeticode.org). -
      2. The default location for clam is under the YETI_DIR +
      3. The default location for clam is under the FEISTY_MEOW_DIR in a folder named clam, although the version of clam shipped with the HOOPLE code (http://hoople.org) actually lives under the root of the hoople @@ -184,7 +184,7 @@ hierarchy.
      4. If the yeti root directory is in $HOME/yeti already, then the -default for YETI_DIR will work and it doesn't need to be declared.
      5. +default for FEISTY_MEOW_DIR will work and it doesn't need to be declared.
      6. Setting the variable:
      7. @@ -221,10 +221,10 @@ to find the clam definitions and scripts.
        1. On Unix (assuming bash as shell): export MAKEFLAGS="-I $YETI_DIR/clam"
        2. + style="font-weight: bold;">export MAKEFLAGS="-I $FEISTY_MEOW_DIR/clam"
        3. On win32: set -MAKEFLAGS="-I %YETI_DIR%/clam"
        4. +MAKEFLAGS="-I %FEISTY_MEOW_DIR%/clam"
        5. This variable also requires forward slashes instead of diff --git a/docs/perl_tools.html b/docs/perl_tools.html index 6a14c438..4349555f 100644 --- a/docs/perl_tools.html +++ b/docs/perl_tools.html @@ -43,7 +43,7 @@ License for details of licensing.
        6. Some of these shell scripts depend on environment variables.  -The most frequent case of this is YETI_DIR, which should point to the +The most frequent case of this is FEISTY_MEOW_DIR, which should point to the top-level directory where the YETIcode scripts are stored on your machine.   This variable is set by default when the scripts are in @@ -210,7 +210,7 @@ passed on the command line into one gigundo stream which is passed to standard output. The output can be piped into another file as desired.

          generate_aliases.pl

          Performs some useful activities for the YETI shell -environment.  Using the environment variable for SHELLDIR (which +environment.  Using the environment variable for FEISTY_MEOW_SCRIPTS (which is set in the appropriate startup files to be the shell scripts directory, where all this stuff lives), generate_aliases will create all of the aliases files for the combinations of operating systems and diff --git a/scripts/archival/pack_yeti.sh b/scripts/archival/pack_yeti.sh index d6932200..71080e60 100644 --- a/scripts/archival/pack_yeti.sh +++ b/scripts/archival/pack_yeti.sh @@ -1,6 +1,6 @@ #!/bin/bash -cd $YETI_DIR +cd $FEISTY_MEOW_DIR # change to the yeti root. cd .. diff --git a/scripts/archival/shared_snarfer.pl b/scripts/archival/shared_snarfer.pl index 4a3d51d1..783a80d2 100644 --- a/scripts/archival/shared_snarfer.pl +++ b/scripts/archival/shared_snarfer.pl @@ -449,7 +449,7 @@ sub restore_archive { if ($outcome) { die("failure to undo archive"); } local($outcome) = - 0xff & system "bash", "$SHELLDIR/files/normal_perm.sh", "."; + 0xff & system "bash", "$FEISTY_MEOW_SCRIPTS/files/normal_perm.sh", "."; if ($outcome) { die("failure to normalize permissions"); } # remove any links that might have crept in; these can cause mischief. diff --git a/scripts/archival/snarf_yeti.pl b/scripts/archival/snarf_yeti.pl index 61ffff08..0510b2f2 100644 --- a/scripts/archival/snarf_yeti.pl +++ b/scripts/archival/snarf_yeti.pl @@ -27,7 +27,7 @@ require "shared_snarfer.pl"; local($number) = &retrieve_number("aa_backup"); # variables for directory location to backup and the file to dump it in. -local($root) = $YETI_DIR; +local($root) = $FEISTY_MEOW_DIR; local($base) = &snarf_prefix("yeti"); local($snarf_file) = &snarf_name($base, $number); diff --git a/scripts/buildor/buildor_strip_code.sh b/scripts/buildor/buildor_strip_code.sh index c7190c68..eb5c6d47 100644 --- a/scripts/buildor/buildor_strip_code.sh +++ b/scripts/buildor/buildor_strip_code.sh @@ -1,10 +1,10 @@ #!/bin/bash -source "$YETI_DIR/scripts/build/seek_all_source.sh" +source "$FEISTY_MEOW_DIR/scripts/build/seek_all_source.sh" function strip_file { file="$1" - perl $SHELLDIR/text/strip_cr.pl "$file" + perl $FEISTY_MEOW_SCRIPTS/text/strip_cr.pl "$file" } #echo tempfile is $SOURCES_FOUND_LIST diff --git a/scripts/buildor/buildor_writable_code.sh b/scripts/buildor/buildor_writable_code.sh index ad5e1a94..de92db09 100644 --- a/scripts/buildor/buildor_writable_code.sh +++ b/scripts/buildor/buildor_writable_code.sh @@ -4,7 +4,7 @@ source $REPOSITORY_DIR/bin/seek_all_source.sh function strip_file { file=$1 - perl $SHELLDIR/strip_cr.pl $file + perl $FEISTY_MEOW_SCRIPTS/strip_cr.pl $file } #echo tempfile is $SOURCES_FOUND_LIST diff --git a/scripts/buildor/find_one_word_comments.sh b/scripts/buildor/find_one_word_comments.sh index c131878f..3b686f79 100644 --- a/scripts/buildor/find_one_word_comments.sh +++ b/scripts/buildor/find_one_word_comments.sh @@ -8,7 +8,7 @@ SOURCES_FOUND_LIST="$(mktemp "$TMP/sources_found.XXXXXX")" -source $SHELLDIR/build/seek_all_source.sh $* +source $FEISTY_MEOW_SCRIPTS/build/seek_all_source.sh $* # got a list of source files now. function examine_file { diff --git a/scripts/buildor/manifester.sh b/scripts/buildor/manifester.sh index 75a52bbf..805db54e 100644 --- a/scripts/buildor/manifester.sh +++ b/scripts/buildor/manifester.sh @@ -7,6 +7,6 @@ if [ -z "$dir" ]; then fi for i in $dir/*.exe; do - mt -manifest $SHELLDIR/clam/cpp/security_manifest.txt -outputresource:$i\;\#1 + mt -manifest $FEISTY_MEOW_SCRIPTS/clam/cpp/security_manifest.txt -outputresource:$i\;\#1 done diff --git a/scripts/buildor/stdbuild.sh b/scripts/buildor/stdbuild.sh index 92e4b8a7..7708469a 100644 --- a/scripts/buildor/stdbuild.sh +++ b/scripts/buildor/stdbuild.sh @@ -5,7 +5,7 @@ # # go to the main folder of the project you're building before you run this. -source $SHELLDIR/core/date_stringer.sh +source $FEISTY_MEOW_SCRIPTS/core/date_stringer.sh echo "$(date_stringer)" echo "Building application from $(\pwd)" diff --git a/scripts/clam/variables.def b/scripts/clam/variables.def index 9699504f..96f4f91f 100644 --- a/scripts/clam/variables.def +++ b/scripts/clam/variables.def @@ -76,7 +76,7 @@ endif # standard CLAM location, then modify this appropriately. export CLAM_DIR # must be set externally! -#export CLAM_DIR := $(SHELLDIR)/clam +#export CLAM_DIR := $(FEISTY_MEOW_SCRIPTS)/clam # "TARGETS_DIR" is where all generated files will end up. Usually the # files are put in a subdirectory named after their file type, such as diff --git a/scripts/core/bootstrap_shells.sh b/scripts/core/bootstrap_shells.sh index c8e4a3cd..5ce180c1 100644 --- a/scripts/core/bootstrap_shells.sh +++ b/scripts/core/bootstrap_shells.sh @@ -23,36 +23,35 @@ THIS_TOOL_NAME="$(basename "$0")" #fi #popd &>/dev/null -# set up the yeti dir. +# set up the feisty_meow dir. pushd "$YETI_CORE_SCRIPTS_DIR/../.." &>/dev/null -export YETI_DIR="$(pwd)" +export FEISTY_MEOW_DIR="$(pwd)" popd &>/dev/null -#echo yeti is $YETI_DIR +#echo feisty_meow is $FEISTY_MEOW_DIR -export YETI_SCRIPTS="$YETI_DIR/scripts" -export SHELLDIR="$YETI_SCRIPTS" +export FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_DIR/scripts" -# GENERADIR is where the generated files yeti uses are located. -export GENERADIR="$HOME/.zz_auto_gen" +# FEISTY_MEOW_GENERATED is where the generated files feisty_meow uses are located. +export FEISTY_MEOW_GENERATED="$HOME/.zz_auto_gen" if [ ! -z "$WINDIR" -o ! -z "$windir" ]; then # assume they are using windoze. - export GENERADIR="$TMP/zz_auto_gen" + export FEISTY_MEOW_GENERATED="$TMP/zz_auto_gen" fi -if [ ! -d "$GENERADIR" ]; then - mkdir "$GENERADIR" +if [ ! -d "$FEISTY_MEOW_GENERATED" ]; then + mkdir "$FEISTY_MEOW_GENERATED" fi -YETIVARS="$GENERADIR/yeti_variables.sh" -echo >"$YETIVARS" -for i in YETI_DIR YETI_SCRIPTS SHELLDIR GENERADIR; do - echo "export $i=${!i}" >>"$YETIVARS" +GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_GENERATED/feisty_meow_variables.sh" +echo >"$GENERATED_FEISTY_MEOW_VARIABLES" +for i in FEISTY_MEOW_DIR FEISTY_MEOW_SCRIPTS FEISTY_MEOW_GENERATED; do + echo "export $i=${!i}" >>"$GENERATED_FEISTY_MEOW_VARIABLES" done # create our common aliases. -perl "$YETI_SCRIPTS/core/generate_aliases.pl" +perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl" -echo -e '\n\n' -echo Established this set of variables to describe how to find yeti assets: -cat "$YETIVARS" -echo -e '\n' +echo ========================================== +echo Established this set of variables to describe how to find feisty_meow assets: +cat "$GENERATED_FEISTY_MEOW_VARIABLES" +echo ========================================== diff --git a/scripts/core/byejob.sh b/scripts/core/byejob.sh index 64c33de0..f210e20a 100644 --- a/scripts/core/byejob.sh +++ b/scripts/core/byejob.sh @@ -6,7 +6,7 @@ export LIGHTWEIGHT_INIT=true # make sure we just get our variables. source $HOME/yeti/scripts/profile.sh export host=$(hostname) -source $SHELLDIR/core/date_stringer.sh +source $FEISTY_MEOW_SCRIPTS/core/date_stringer.sh # use this to always print the message. # export hostlist=$host @@ -36,7 +36,7 @@ for i in $hostlist; do if [ "$host" = "$i" -o "$host" = "$i.$DOMAIN_NAME" ]; then # echo $(date_stringer)": $host matched." >>$HOME/host_matched_in_byejob.txt ( /bin/bash <> $GENERADIR/p_alias.sh"); +open(she, ">> $FEISTY_MEOW_GENERATED/p_alias.sh"); #print "os is $OS\n"; # find the list of files in the scripts directory. -#opendir(scripts, "$SHELLDIR"); +#opendir(scripts, "$FEISTY_MEOW_SCRIPTS"); #@shell_files = sort(readdir(scripts)); #print "yeti scripts: @shell_files\n"; -@shell_files = &load_file_names("$SHELLDIR"); +@shell_files = &load_file_names("$FEISTY_MEOW_SCRIPTS"); # construct aliases for items in the scripts directory. foreach $file (@shell_files) { @@ -127,14 +127,17 @@ foreach $file (@shell_files) { if ($file =~ '^\.$' || $file =~ '^\.\.$' || $file =~ '^.svn$' + || $file =~ '^.git$' || $file =~ /\/\.$/ || $file =~ /\/\.\.$/ - || $file =~ /\/\.svn$/) { + || $file =~ /\/\.svn$/ + || $file =~ /\/\.git$/ + ) { # just skip this item; it's a special directory. - } elsif (-d "$SHELLDIR/$file") { + } elsif (-d "$FEISTY_MEOW_SCRIPTS/$file") { # if we see a subdirectory in the scripts folder, we add all the # scripts in it as aliases. we recurse only one level. - opendir(subdir, "$SHELLDIR/$file"); + opendir(subdir, "$FEISTY_MEOW_SCRIPTS/$file"); @subdir_files = sort(readdir(subdir)); foreach $subfile (@subdir_files) { push(@shell_files, "$file/$subfile"); @@ -142,7 +145,7 @@ foreach $file (@shell_files) { } else { # if it's a regular file, we'll try to make an alias for it. the function # will only fire if the ending is appropriate for the script languages we use. - &make_alias($file, "$SHELLDIR"); + &make_alias($file, "$FEISTY_MEOW_SCRIPTS"); } } diff --git a/scripts/core/goodbye.sh b/scripts/core/goodbye.sh index 9d0cd243..c16ac4b6 100644 --- a/scripts/core/goodbye.sh +++ b/scripts/core/goodbye.sh @@ -1,7 +1,7 @@ #!/bin/bash -bash $SHELLDIR/byemessage.sh +bash $FEISTY_MEOW_SCRIPTS/byemessage.sh -nohup bash $SHELLDIR/byejob.sh >/dev/null 2>&1 +nohup bash $FEISTY_MEOW_SCRIPTS/byejob.sh >/dev/null 2>&1 if [ -f $TMP/trash.last_keep_awake_process ]; then kill -9 $(cat $TMP/trash.last_keep_awake_process) diff --git a/scripts/core/i.sh b/scripts/core/i.sh index 18460d3d..90edb2a5 100644 --- a/scripts/core/i.sh +++ b/scripts/core/i.sh @@ -1,7 +1,7 @@ #!/bin/bash ( -source $SHELLDIR/core/date_stringer.sh +source $FEISTY_MEOW_SCRIPTS/core/date_stringer.sh echo '###############################################################################' echo @@ -22,7 +22,7 @@ echo echo '###############################################################################' echo echo You are running the following processes: -. $SHELLDIR/users/findme.sh +. $FEISTY_MEOW_SCRIPTS/users/findme.sh echo echo '###############################################################################' ) | less diff --git a/scripts/core/lightweight_unix_login.sh b/scripts/core/lightweight_unix_login.sh index 34b22415..99afe94e 100644 --- a/scripts/core/lightweight_unix_login.sh +++ b/scripts/core/lightweight_unix_login.sh @@ -4,5 +4,5 @@ # lightweight version of unix login script. # -source $SHELLDIR/core/variables.sh -source $SHELLDIR/core/create_tempdir.sh +source $FEISTY_MEOW_SCRIPTS/core/variables.sh +source $FEISTY_MEOW_SCRIPTS/core/create_tempdir.sh diff --git a/scripts/core/profile.sh b/scripts/core/profile.sh index 54f9b5ce..7f03bf89 100644 --- a/scripts/core/profile.sh +++ b/scripts/core/profile.sh @@ -9,16 +9,16 @@ export SHELL_DEBUG=true # when they run. ####fault--repeated code from bootstrap. isolate to shared location. -# GENERADIR is where the generated files yeti uses are located. -export GENERADIR="$HOME/.zz_auto_gen" +# FEISTY_MEOW_GENERATED is where the generated files yeti uses are located. +export FEISTY_MEOW_GENERATED="$HOME/.zz_auto_gen" if [ ! -z "$WINDIR" -o ! -z "$windir" ]; then # assume they are using windoze. - export GENERADIR="$TMP/zz_auto_gen" + export FEISTY_MEOW_GENERATED="$TMP/zz_auto_gen" fi # make sure our main variables are established. -YETIVARS="$GENERADIR/yeti_variables.sh" -if [ ! -f "$YETIVARS" ]; then +GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_GENERATED/feisty_meow_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.:" echo " bash $HOME/feisty_meow/scripts/core/bootstrap_shells.sh" @@ -26,7 +26,7 @@ if [ ! -f "$YETIVARS" ]; then fi # pull in our variable set. -source "$YETIVARS" +source "$GENERATED_FEISTY_MEOW_VARIABLES" # define a default name, if one wasn't already set. if [ -z "$NAME" ]; then @@ -41,14 +41,14 @@ if [ "$OS" == "Windows_NT" ]; then export HOME=/c/home fi if [ ! -d "$HOME" ]; then mkdir $HOME; fi -## export GENERADIR=$TMP/zz_auto_gen +## export FEISTY_MEOW_GENERATED=$TMP/zz_auto_gen fi if [ -z "$LIGHTWEIGHT_INIT" ]; then # perform the bulk of the login. - source $SHELLDIR/core/unix_login.sh + source $FEISTY_MEOW_SCRIPTS/core/unix_login.sh else # this is the lightweight login that just wants variables set. - source $SHELLDIR/core/lightweight_unix_login.sh + source $FEISTY_MEOW_SCRIPTS/core/lightweight_unix_login.sh fi diff --git a/scripts/core/sh_aliases.txt b/scripts/core/sh_aliases.txt deleted file mode 100644 index d1652be6..00000000 --- a/scripts/core/sh_aliases.txt +++ /dev/null @@ -1,123 +0,0 @@ -# This file contains aliases that extend the set of commands available -# to the interactive shell user in Unix. They are personally tailored. - -if [ ! -z "$SHELL_DEBUG" ]; then - echo specialized alias initialization begins... -fi - -# define our functions for use in the shell. -source "$SHELLDIR/core/functions.sh" - -# Standard CAK aliases that add to or extend Unix commands. -alias bye='. $SHELLDIR/core/goodbye.sh' -alias calc='kcalc' -alias cls='clear_colormap; clear' -if [ "$OS" != "Windows_NT" ]; then - if [ -n "$IS_DARWIN" ]; then - # case for mac os x. - alias exp='open' - elif [ ! -z "$(which nautilus)" ]; then - alias exp='nautilus' - else -#check if konqueror exists also? fall back to uhhh midnight cmdr? - alias exp='konqueror' - fi -else - alias explorer="bash $SHELLDIR/winders/exploder.sh" - alias exp="bash $SHELLDIR/winders/exploder.sh" -fi - -alias pwd="/bin/pwd|sed -e 's/^\/home\/$USER/~/'" -alias notepad='gedit' -if [ "$OS" = "Windows_NT" ]; then - # aliases we only use on the winders side. - alias vi='gvim' -fi - -# su function: makes su perform a login. -# for some OSes, this transfers the X authority information to the new login. -function su { - # decide if we think this is debian or ubuntu or a variant. - DEBIAN_LIKE=$(if [ ! -z "$(grep -i debian /etc/issue)" \ - -o ! -z "$(grep -i ubuntu /etc/issue)" ]; then echo 1; else echo 0; fi) - - if [ $DEBIAN_LIKE -eq 1 ]; then - # debian currently requires the full version which imports X authority - # information for su. - - # get the x authority info for our current user. - source $SHELLDIR/x_win/get_x_auth.sh - - if [ -z "$X_auth_info" ]; then - # if there's no authentication info to pass along, we just do a normal su. - /bin/su -l $* - else - # under X, we update the new login's authority info with the previous - # user's info. - (unset XAUTHORITY; /bin/su -l $* -c "$X_auth_info ; export DISPLAY=$DISPLAY ; bash") - fi - else - # non-debian supposedly doesn't need the extra overhead any more. - # or at least suse doesn't, which is the other one we've tested on. - /bin/su -l $* - fi - - # relabel the console after returning. - bash $SHELLDIR/tty/label_terminal_with_infos.sh -} - -# sudo function wraps the normal sudo by ensuring we replace the terminal -# label if they're doing an su with the sudo. -function sudo { - local first_command="$1" - /usr/bin/sudo $* - if [ "$first_command" == "su" ]; then - # yep, they were doing an su, but they're back now. - bash $SHELLDIR/tty/label_terminal_with_infos.sh - fi -} - -alias whereami='echo whoa dude, try not to think about it...' - -# buntar is a long needed uncompressing macro that feeds into tar -x. -# it takes a list of bz2 file names and extracts their contents into -# sequentially numbered directories. -function buntar { - index=1 - for i in $*; do - mkdir buntar_$index - pushd buntar_$index &>/dev/null - file=$i - # if the filename has no directory component, we will assume it used to - # be above our unzipping directory here. - if [ "$(basename $file)" = $file ]; then - file=../$file - fi - bunzip2 -d -c $file | tar -xf - - popd &>/dev/null - index=$(expr $index + 1) - done -} - -# trashes the .#blah files that cvs and svn leave behind when finding conflicts. -# this kind of assumes you've already checked them for any salient facts. -function clean_cvs_junk { - for i in $*; do - find $i -follow -type f -iname ".#*" -exec perl $SHELLDIR/files/safedel.pl {} ";" - done -} - -# call the generated aliases file, if it exists. -if [ -f "$GENERADIR/p_alias.sh" ]; then - if [ ! -z "$SHELL_DEBUG" ]; then echo launching generated aliases.; fi - source $GENERADIR/p_alias.sh - if [ ! -z "$SHELL_DEBUG" ]; then echo done with generated aliases.; fi -fi - -# remove the fredization macro if it was defined, helping to avoid running -# the shell scripts twice for users like root that don't always load this -# stuff. -unalias fredme >/dev/null 2>&1 - -if [ ! -z "$SHELL_DEBUG" ]; then echo aliases initialization ends....; fi - diff --git a/scripts/core/unix_login.sh b/scripts/core/unix_login.sh index 4d5c4768..418677f3 100644 --- a/scripts/core/unix_login.sh +++ b/scripts/core/unix_login.sh @@ -6,16 +6,16 @@ if [ ! -z "$SHELL_DEBUG" ]; then echo unix login begins...; fi -GENERADIR=$(echo $GENERADIR | sed -e 's/\\/\//g') -YETI_SCRIPTS="$(echo $YETI_SCRIPTS | sed -e 's/\\/\//g')" -SHELLDIR="$YETI_SCRIPTS" +FEISTY_MEOW_GENERATED=$(echo $FEISTY_MEOW_GENERATED | sed -e 's/\\/\//g') +FEISTY_MEOW_SCRIPTS="$(echo $FEISTY_MEOW_SCRIPTS | sed -e 's/\\/\//g')" +FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_SCRIPTS" # Set up all of the environment's system variables. This is the first step # in the majestic plan we have for this shell's initialization. -source $YETI_SCRIPTS/core/variables.sh +source $FEISTY_MEOW_SCRIPTS/core/variables.sh # Also set up the temporary directory... -source $YETI_SCRIPTS/core/create_tempdir.sh +source $FEISTY_MEOW_SCRIPTS/core/create_tempdir.sh # ulimit and umask. umask sets a permission mask for all file # creations. The mask shown here disallows writing by the "group" and @@ -32,7 +32,7 @@ if [ $? -ne 0 ]; then if [ ! -z "$SHELL_DEBUG" ]; then echo the aliases were missing, now they are added... fi - source $GENERADIR/aliases.sh + source $FEISTY_MEOW_GENERATED/aliases.sh fi # allow connections to our x server from the local host. @@ -44,7 +44,7 @@ if [ ! -z "$DISPLAY" ]; then fi # a minor tickle of the title of the terminal, in case there is one. -bash $YETI_SCRIPTS/tty/label_terminal_with_infos.sh +bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh if [ ! -z "$SHELL_DEBUG" ]; then echo unix login ends....; fi diff --git a/scripts/core/unter_alia.sh b/scripts/core/unter_alia.sh index 644ca298..43c414cb 100644 --- a/scripts/core/unter_alia.sh +++ b/scripts/core/unter_alia.sh @@ -1,74 +1,59 @@ #!/bin/bash # generates alias files for different operating systems and shell scripts. +# or really, mainly for bash these days, on linux. but we also run under +# msys and cygwin to some degree. # -# This script generates command alias definitions for a variety of different -# shells. The "common.alias" file is used in all of the generated -# files as a base set of generally useful aliases. Then the appropriate -# shell's specific aliases are added in; these are named after the shell that -# they support, e.g. "sh_aliases.txt" is used with the sh and bash shells. -# The third component of the file is a set of aliases generated automatically -# from the names of all the shell scripts in SHELLDIR. +# The "common.alias" file is used in the generated aliases file as a base +# set of generally useful aliases. Shorter aliases based on any scripts +# we can find in the feisty meow script hierarchy are added in as well. # -# Additionally, if a file named "c_common_aliases.txt" is found in the -# $SHELLDIR/custom directory, then it is added in after the other alias files -# and can override any existing aliases or provide additional local aliases. -# This file is not included with the YETIcode scripts, since it is intended -# to be provided by individual users. -# -# Further, if any other shell-specific alias files are found mirrored under -# the custom folder, they are pulled in as overrides for that kind of shell. -# For example, there is a sh_aliases.txt in the scripts directory for sh, -# but if there's also scripts/custom/c_sh_aliases.txt, then that will be -# plugged in as well. +# If any other alias files are found in the scripts/custom folder, they +# are pulled in as additions and overrides for the basic feisty meow command +# set. + +if [ ! -z "$SHELL_DEBUG" ]; then echo rebuiling generated aliases file...; fi # create our generated shells directory if it's not already. -if [ ! -d $GENERADIR ]; then mkdir $GENERADIR; fi +if [ ! -d $FEISTY_MEOW_GENERATED ]; then mkdir $FEISTY_MEOW_GENERATED; fi # test if we can use color in ls... test_color=$(ls --help 2>&1 | grep -i color) -export COMMON_FILES=$SHELLDIR/core/common_aliases.txt +ALIAS_DEFINITION_FILES=("$FEISTY_MEOW_SCRIPTS/core/common.alias") # if custom aliases files exist, add them to the list. -for i in "$SHELLDIR/custom/*.txt"; do - COMMON_FILES+=" $i" +for i in "$FEISTY_MEOW_SCRIPTS/custom/*.alias"; do +echo adding $i + ALIAS_DEFINITION_FILES+=("$i") +done +echo "alias files:" +for i in "${ALIAS_DEFINITION_FILES[@]}"; do + echo " $(basename $(dirname $i))/$(basename $i)" done -echo -e "Found alias files:\n$COMMON_FILES" # write the aliases for sh and bash scripts. -export ALIASES_FILE="$GENERADIR/aliases.sh" -echo "writing $ALIASES_FILE..." +GENERATED_ALIAS_FILE="$FEISTY_MEOW_GENERATED/aliases.sh" +echo "writing $GENERATED_ALIAS_FILE..." #hmmm: perhaps a good place for a function to create the header, # given the appropriate comment code. -echo "##" >$ALIASES_FILE -echo "## generated file: $ALIASES_FILE" >>$ALIASES_FILE -echo "## please do not edit." >>$ALIASES_FILE -echo "##" >>$ALIASES_FILE +echo "##" >$GENERATED_ALIAS_FILE +echo "## generated file: $GENERATED_ALIAS_FILE" >>$GENERATED_ALIAS_FILE +echo "## please do not edit." >>$GENERATED_ALIAS_FILE +echo "##" >>$GENERATED_ALIAS_FILE if [ ! -z "$test_color" ]; then - echo "color_add=--color=auto" >>$ALIASES_FILE + echo "color_add=--color=auto" >>$GENERATED_ALIAS_FILE else - echo "color_add=" >>$ALIASES_FILE + echo "color_add=" >>$GENERATED_ALIAS_FILE fi -# we process the alias file to add the word "alias" to the first of every -# line that's not a comment. -#cat $COMMON_FILES | sed -e 's/^\([^#]\)/alias \1/' >>$ALIASES_FILE -#nope: we no longer do that. - -cat $COMMON_FILES >>$ALIASES_FILE - -#echo "##" >>$ALIASES_FILE -#echo "## now including shell specific additions..." >>$ALIASES_FILE -#echo "##" >>$ALIASES_FILE -## then just dump the sh specific alias stuff into the file. -#cat $SHELLDIR/core/sh_aliases.txt >>$ALIASES_FILE -# add in customized sh aliases if they exist. -#if [ -f "$SHELLDIR/custom/c_sh_aliases.txt" ]; then -# cat $SHELLDIR/custom/c_sh_aliases.txt >>$ALIASES_FILE -#fi +# plow in the full set of aliases into the file. +for i in "${ALIAS_DEFINITION_FILES[@]}"; do + cat $i >>$GENERATED_ALIAS_FILE +done +if [ ! -z "$SHELL_DEBUG" ]; then echo done rebuiling generated aliases file.; fi diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index 07e03ee6..65c896f6 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -41,21 +41,21 @@ fi # configuration examples, javascript code, and other stuff. export SCRIPT_SYSTEM=feisty_meow -#if [ -z "$YETI_DIR" ]; then export YETI_DIR="$HOME/$SCRIPT_SYSTEM"; fi -#if [ -z "$YETI_SCRIPTS" ]; then export YETI_SCRIPTS="$YETI_DIR/scripts"; fi -#if [ -z "$SHELLDIR" ]; then export SHELLDIR="$YETI_SCRIPTS"; fi +#if [ -z "$FEISTY_MEOW_DIR" ]; then export FEISTY_MEOW_DIR="$HOME/$SCRIPT_SYSTEM"; fi +#if [ -z "$FEISTY_MEOW_SCRIPTS" ]; then export FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_DIR/scripts"; fi +#if [ -z "$FEISTY_MEOW_SCRIPTS" ]; then export FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_SCRIPTS"; fi # include helpful functions. -source "$YETI_SCRIPTS/core/functions.sh" +source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" # LIBDIR is an older variable that points at the root of the yeti code. -export LIBDIR=$YETI_DIR +export LIBDIR=$FEISTY_MEOW_DIR -if [ -z "$GENERADIR" ]; then +if [ -z "$FEISTY_MEOW_GENERATED" ]; then # The generated scripts directory is where automatically generated files live. # It is separate from the main body of the shell scripts in order to keep things from # exploding. - export GENERADIR=$HOME/.zz_auto_gen + export FEISTY_MEOW_GENERATED=$HOME/.zz_auto_gen fi ############################################################################## @@ -63,8 +63,10 @@ fi ############################################################################## # pull in the custom overrides for feisty_meow scripts. -for i in $YETI_SCRIPTS/custom/*.sh; do - echo "Sourcing custom file: $i" +for i in $FEISTY_MEOW_SCRIPTS/custom/*.sh; do + if [ ! -z "$SHELL_DEBUG" ]; then + echo "loading customization: $(basename $(dirname $i))/$(basename $i)" + fi source $i done @@ -79,16 +81,16 @@ export PERLLIB if [ "$OS" != "Windows_NT" ]; then PERLLIB+="/usr/lib/perl5" else -#echo "the scripts dir is $YETI_SCRIPTS" - YETI_SCRIPTS="$(echo $YETI_SCRIPTS | sed -e 's/\\/\//g')" - SHELLDIR="$YETI_SCRIPTS" -#echo "the scripts dir is now $SHELLDIR" +#echo "the scripts dir is $FEISTY_MEOW_SCRIPTS" + FEISTY_MEOW_SCRIPTS="$(echo $FEISTY_MEOW_SCRIPTS | sed -e 's/\\/\//g')" + FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_SCRIPTS" +#echo "the scripts dir is now $FEISTY_MEOW_SCRIPTS" export PERLIO=:perlio # choose perl's IO over the system's so we can handle file bytes exactly. fi #make this automatic! -PERLLIB+=":$YETI_SCRIPTS/core:$YETI_SCRIPTS/text:$YETI_SCRIPTS/files:$YETI_SCRIPTS/archival" +PERLLIB+=":$FEISTY_MEOW_SCRIPTS/core:$FEISTY_MEOW_SCRIPTS/text:$FEISTY_MEOW_SCRIPTS/files:$FEISTY_MEOW_SCRIPTS/archival" # set this so nechung can find its data. export NECHUNG=$LIBDIR/database/fortunes.dat @@ -164,7 +166,7 @@ if [ $found_build_vars == 1 ]; then fi # Set the path for locating applications. -export PATH="$(dos_to_msys_path $BINDIR):$(dos_to_msys_path $GENERADIR):$PATH:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/lib:/usr/games:/usr/bin:." +export PATH="$(dos_to_msys_path $BINDIR):$(dos_to_msys_path $FEISTY_MEOW_GENERATED):$PATH:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/lib:/usr/games:/usr/bin:." if [ ! -z "$SHELL_DEBUG" ]; then echo variables initialization ends....; fi diff --git a/scripts/database/backup_mysql_dbs.sh b/scripts/database/backup_mysql_dbs.sh index 2f21f49a..3b1888dc 100644 --- a/scripts/database/backup_mysql_dbs.sh +++ b/scripts/database/backup_mysql_dbs.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $SHELLDIR/core/date_stringer.sh +source $FEISTY_MEOW_SCRIPTS/core/date_stringer.sh temphost=$(hostname | sed -e 's/\([^.]*\)\..*/\1/') tar -czf /z/stuffing/archives/backup_dbs_${temphost}_$(date_stringer).tar.gz /home/archives/mysql_dbs/* diff --git a/scripts/email/move_spams_and_check.sh b/scripts/email/move_spams_and_check.sh index b7b4b8b2..9c69c9be 100644 --- a/scripts/email/move_spams_and_check.sh +++ b/scripts/email/move_spams_and_check.sh @@ -29,7 +29,7 @@ echo "Setting the directory back to user's ownership..." sudo chown -R $USER "$SPAM_HOLD" sudo chgrp -R $USER "$SPAM_HOLD" echo "Running checker for false-positive spams..." -bash "$SHELLDIR/email/scan_spam.sh" "$SPAM_HOLD" "$EMAIL_WHITE_LIST" 2>&1 \ +bash "$FEISTY_MEOW_SCRIPTS/email/scan_spam.sh" "$SPAM_HOLD" "$EMAIL_WHITE_LIST" 2>&1 \ | tee "$REPORT_FILE" diff --git a/scripts/examples/custom_overrides/fred/fred_common.aliases b/scripts/examples/custom_overrides/fred/fred_common.alias similarity index 100% rename from scripts/examples/custom_overrides/fred/fred_common.aliases rename to scripts/examples/custom_overrides/fred/fred_common.alias diff --git a/scripts/examples/custom_overrides/fred/c_variables.sh b/scripts/examples/custom_overrides/fred/fred_variables.sh similarity index 100% rename from scripts/examples/custom_overrides/fred/c_variables.sh rename to scripts/examples/custom_overrides/fred/fred_variables.sh diff --git a/scripts/examples/custom_overrides/readme.txt b/scripts/examples/custom_overrides/readme.txt index d7ab4c64..92bb3023 100644 --- a/scripts/examples/custom_overrides/readme.txt +++ b/scripts/examples/custom_overrides/readme.txt @@ -1,13 +1,10 @@ - this folder has some examples of how various people (or one person right now) do their custom scripts. -the scripts often have the same name as the main script's name, but with -a "c_" in front. ones understood currently are: - c_common_aliases.txt - c_sh_aliases.txt - c_variables.sh +the folder can have alias files (ending in .alias) that are written in bash, +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 diff --git a/scripts/files/find_bad_protection.sh b/scripts/files/find_bad_protection.sh index 4fd19e6e..761362f2 100644 --- a/scripts/files/find_bad_protection.sh +++ b/scripts/files/find_bad_protection.sh @@ -1,6 +1,6 @@ #!/bin/bash -source $SHELLDIR/core/date_stringer.sh +source $FEISTY_MEOW_SCRIPTS/core/date_stringer.sh bad_file="$HOME/bad_protections.txt" if [ $# = 0 ]; then dirname=$HOME; export dirname; @@ -41,7 +41,7 @@ rm $outfile echo "Searching for Files Not Owned by the User in $HOME...." echo "" >>$bad_file -bash $SHELLDIR/find_non_owned.sh $HOME >>$bad_file +bash $FEISTY_MEOW_SCRIPTS/find_non_owned.sh $HOME >>$bad_file echo "" >>$bad_file echo "" >>$bad_file diff --git a/scripts/files/recursive_renlower.sh b/scripts/files/recursive_renlower.sh index c79d9930..4d3f68de 100644 --- a/scripts/files/recursive_renlower.sh +++ b/scripts/files/recursive_renlower.sh @@ -1,7 +1,7 @@ #!/bin/bash #need to support multiple names. for i; do -#old find "$1" -type d -depth -print -exec perl $SHELLDIR/renlower.pl {}/* ';' - find "$i" -depth -exec perl $SHELLDIR/renlower.pl "{}" ';' +#old find "$1" -type d -depth -print -exec perl $FEISTY_MEOW_SCRIPTS/renlower.pl {}/* ';' + find "$i" -depth -exec perl $FEISTY_MEOW_SCRIPTS/renlower.pl "{}" ';' done diff --git a/scripts/files/recursive_whack_dupes.sh b/scripts/files/recursive_whack_dupes.sh index a972e6d2..3978f3fe 100644 --- a/scripts/files/recursive_whack_dupes.sh +++ b/scripts/files/recursive_whack_dupes.sh @@ -43,7 +43,7 @@ pushd $whack_dir &>/dev/null for i in $(find . -depth -mindepth 1 -type d \ -exec echo {} ';' | sed -e 's/^.\///'); do - bash $SHELLDIR/whack_dupes_dir.sh $exemplar_dir/$i $i + bash $FEISTY_MEOW_SCRIPTS/whack_dupes_dir.sh $exemplar_dir/$i $i done # get back to where we started. diff --git a/scripts/makefile b/scripts/makefile index 629a551d..f06b0804 100644 --- a/scripts/makefile +++ b/scripts/makefile @@ -4,19 +4,19 @@ PROJECT = Shells TARGETS += regenerate OTHER_CLEANS += clean_generated # override setting from clam. -export SHELLDIR = $(YETI_DIR)/scripts +export FEISTY_MEOW_SCRIPTS = $(FEISTY_MEOW_DIR)/scripts include rules.def regenerate: @echo regenerating aliases. - echo "SHELLDIR = $(SHELLDIR)" - echo "GENERADIR = $(GENERADIR)" - $(CATCHER)'if [ ! -d $(GENERADIR) ]; then mkdir $(GENERADIR); fi' - $(CATCHER)perl $(SHELLDIR)/core/generate_aliases.pl - $(CATCHER)'(export LIGHTWEIGHT_INIT=true; source $(SHELLDIR)/core/profile.sh; perl $(SHELLDIR)/text/new_sig.pl)' + echo "FEISTY_MEOW_SCRIPTS = $(FEISTY_MEOW_SCRIPTS)" + echo "FEISTY_MEOW_GENERATED = $(FEISTY_MEOW_GENERATED)" + $(CATCHER)'if [ ! -d $(FEISTY_MEOW_GENERATED) ]; then mkdir $(FEISTY_MEOW_GENERATED); fi' + $(CATCHER)perl $(FEISTY_MEOW_SCRIPTS)/core/generate_aliases.pl + $(CATCHER)'(export LIGHTWEIGHT_INIT=true; source $(FEISTY_MEOW_SCRIPTS)/core/profile.sh; perl $(FEISTY_MEOW_SCRIPTS)/text/new_sig.pl)' clean_generated: @echo removing generated aliases. - $(CATCHER)'if [ -d $(GENERADIR) ]; then \rm -rf $(GENERADIR); fi' + $(CATCHER)'if [ -d $(FEISTY_MEOW_GENERATED) ]; then \rm -rf $(FEISTY_MEOW_GENERATED); fi' diff --git a/scripts/multimedia/play_random.sh b/scripts/multimedia/play_random.sh index 700dff51..b2e824fc 100644 --- a/scripts/multimedia/play_random.sh +++ b/scripts/multimedia/play_random.sh @@ -25,7 +25,7 @@ if [ ! -z "$grunty" ]; then done # now play the file - bash $SHELLDIR/sound_play.sh $TO_PLAY + bash $FEISTY_MEOW_SCRIPTS/sound_play.sh $TO_PLAY fi diff --git a/scripts/multimedia/randomly_play.sh b/scripts/multimedia/randomly_play.sh index de7837d4..0003ded1 100644 --- a/scripts/multimedia/randomly_play.sh +++ b/scripts/multimedia/randomly_play.sh @@ -6,6 +6,6 @@ NOISE_IT_UP=$(expr $RANDOM / 91) #echo noise lev is $NOISE_IT_UP if [ $NOISE_IT_UP -gt 108 -a $NOISE_IT_UP -le 128 ]; then # we hit our percentage. - bash $SHELLDIR/play_random.sh + bash $FEISTY_MEOW_SCRIPTS/play_random.sh fi diff --git a/scripts/multimedia/sound_play.sh b/scripts/multimedia/sound_play.sh index 36652ff2..72054185 100644 --- a/scripts/multimedia/sound_play.sh +++ b/scripts/multimedia/sound_play.sh @@ -2,7 +2,7 @@ # play the sound files specified. -source "$SHELLDIR/core/functions.sh" # provides psfind. +source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" # provides psfind. if [ $# -lt 1 ]; then #echo no sound file specified. diff --git a/scripts/opensim/backup_opensim.sh b/scripts/opensim/backup_opensim.sh index 030e372c..5c18e55b 100644 --- a/scripts/opensim/backup_opensim.sh +++ b/scripts/opensim/backup_opensim.sh @@ -1,7 +1,7 @@ #!/bin/bash # a simple script that backs up the opensim database assets. -source $SHELLDIR/core/date_stringer.sh +source $FEISTY_MEOW_SCRIPTS/core/date_stringer.sh host=$(echo $(hostname) | sed -e 's/\([^.]*\)\..*/\1/') diff --git a/scripts/opensim/backup_osgrid.sh b/scripts/opensim/backup_osgrid.sh index 72212f11..88d56526 100644 --- a/scripts/opensim/backup_osgrid.sh +++ b/scripts/opensim/backup_osgrid.sh @@ -1,7 +1,7 @@ #!/bin/bash # a simple script that backs up the opensim database assets. -source $SHELLDIR/core/date_stringer.sh +source $FEISTY_MEOW_SCRIPTS/core/date_stringer.sh host=$(echo $(hostname) | sed -e 's/\([^.]*\)\..*/\1/') diff --git a/scripts/opensim/maybe_restart_opensim.sh b/scripts/opensim/maybe_restart_opensim.sh index a6abe635..10ee9bb3 100644 --- a/scripts/opensim/maybe_restart_opensim.sh +++ b/scripts/opensim/maybe_restart_opensim.sh @@ -2,7 +2,7 @@ # this locates the main opensim process if possible. if we cannot find it, # then the process is restarted. -source $SHELLDIR/opensim/opensim_utils.sh +source $FEISTY_MEOW_SCRIPTS/opensim/opensim_utils.sh # see if the process is findable. # (this approach will not work if the process actually freezes up but diff --git a/scripts/opensim/run_opensim.sh b/scripts/opensim/run_opensim.sh index 2ab0d9e7..04499bdb 100644 --- a/scripts/opensim/run_opensim.sh +++ b/scripts/opensim/run_opensim.sh @@ -3,7 +3,7 @@ # utility. then the processes can all be accessed when desired, rather than # needing to be started in 5 or so separate windows. -source $SHELLDIR/opensim/opensim_utils.sh +source $FEISTY_MEOW_SCRIPTS/opensim/opensim_utils.sh # jump into the opensim binaries directory so we can run stuff. pushd $HOME/opensim/bin &>/dev/null diff --git a/scripts/opensim/run_osgrid.sh b/scripts/opensim/run_osgrid.sh index d4c201a4..52a38b87 100644 --- a/scripts/opensim/run_osgrid.sh +++ b/scripts/opensim/run_osgrid.sh @@ -3,7 +3,7 @@ # screen utility. note that this will only be useful for an osgrid-attached # sim server. -source $SHELLDIR/opensim/opensim_utils.sh +source $FEISTY_MEOW_SCRIPTS/opensim/opensim_utils.sh # jump into the opensim binaries directory so we can run stuff. pushd $HOME/opensim/bin &>/dev/null diff --git a/scripts/opensim/stop_opensim.sh b/scripts/opensim/stop_opensim.sh index 11a33980..7bdad6f3 100644 --- a/scripts/opensim/stop_opensim.sh +++ b/scripts/opensim/stop_opensim.sh @@ -2,7 +2,7 @@ # this script stops a 0.6.9 era opensimulator system that was started by # the run_opensim or run_osgrid script. this will work for either case. -source $SHELLDIR/opensim/opensim_utils.sh +source $FEISTY_MEOW_SCRIPTS/opensim/opensim_utils.sh # the brains for the script is the screen and process names we need to control. close_application opensim OpenSim.exe diff --git a/scripts/opensim/stop_osgrid.sh b/scripts/opensim/stop_osgrid.sh index e15ac755..8a3cf900 100644 --- a/scripts/opensim/stop_osgrid.sh +++ b/scripts/opensim/stop_osgrid.sh @@ -2,7 +2,7 @@ # this script stops a 0.6.9 era opensimulator system that was started by # the run_opensim or run_osgrid script. this will work for either case. -source $SHELLDIR/opensim/opensim_utils.sh +source $FEISTY_MEOW_SCRIPTS/opensim/opensim_utils.sh # the brains for the script is the screen and process names we need to control. close_application opensim OpenSim.exe diff --git a/scripts/processes/pskill.sh b/scripts/processes/pskill.sh index 52deaec8..a9fb3815 100644 --- a/scripts/processes/pskill.sh +++ b/scripts/processes/pskill.sh @@ -4,7 +4,7 @@ if [ -z "$1" ]; then exit 2 fi -source "$SHELLDIR/functions.sh" # provides psfind. +source "$FEISTY_MEOW_SCRIPTS/functions.sh" # provides psfind. PIDLIST=$(psfind $1) #echo "PIDS are $PIDLIST" diff --git a/scripts/rev_control/checkin.sh b/scripts/rev_control/checkin.sh index 23532985..4a747e76 100644 --- a/scripts/rev_control/checkin.sh +++ b/scripts/rev_control/checkin.sh @@ -3,7 +3,7 @@ # checks in all our commonly used folders. # note: fred specific. -source "$SHELLDIR/rev_control/rev_control.sh" +source "$FEISTY_MEOW_SCRIPTS/rev_control/rev_control.sh" # selects the method for check-in based on where we are. function do_checkin() diff --git a/scripts/rev_control/getme.sh b/scripts/rev_control/getme.sh index bd1edc4a..da38c629 100644 --- a/scripts/rev_control/getme.sh +++ b/scripts/rev_control/getme.sh @@ -2,7 +2,7 @@ # gets all of fred's revision control folders out. -source "$SHELLDIR/rev_control/rev_control.sh" +source "$FEISTY_MEOW_SCRIPTS/rev_control/rev_control.sh" if [ "$(pwd)" != "$TMP" ]; then # echo "Moving to the TMP directory to avoid file access conflicts..." @@ -65,8 +65,8 @@ fi less $TMPO_CHK # we now regenerate the scripts after getme, to ensure it's done automatically. -bash "$SHELLDIR/core/bootstrap_shells.sh" -perl "$SHELLDIR/core/generate_aliases.pl" +bash "$FEISTY_MEOW_SCRIPTS/core/bootstrap_shells.sh" +perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl" echo nechung diff --git a/scripts/schedule/start_calendar.sh b/scripts/schedule/start_calendar.sh index f58262da..cd263b90 100644 --- a/scripts/schedule/start_calendar.sh +++ b/scripts/schedule/start_calendar.sh @@ -1,4 +1,4 @@ #!/bin/bash -perl $SHELLDIR/schedule/generate_reminders.pl -echo '(export LIBDIR=$LIBDIR; bash $SHELLDIR/schedule/start_calendar.sh) &>/dev/null' | at 4:20am +perl $FEISTY_MEOW_SCRIPTS/schedule/generate_reminders.pl +echo '(export LIBDIR=$LIBDIR; bash $FEISTY_MEOW_SCRIPTS/schedule/start_calendar.sh) &>/dev/null' | at 4:20am diff --git a/scripts/security/start_tunnels.sh b/scripts/security/start_tunnels.sh index 242a6432..b1250b53 100644 --- a/scripts/security/start_tunnels.sh +++ b/scripts/security/start_tunnels.sh @@ -9,7 +9,7 @@ #source $HOME/yeti/scripts/profile.sh -soundfile=$YETI_DIR/database/sounds/woouoo.wav +soundfile=$FEISTY_MEOW_DIR/database/sounds/woouoo.wav if [ ! -z "$1" ]; then soundfile=$1 fi @@ -17,7 +17,7 @@ fi while true; do echo Connecting sendmail and proxy servers via zooty. ssh -i $HOME/.ssh/id_dsa_fred -2 -N -v -L 14008:localhost:25 fred@zooty.koeritz.com - bash $SHELLDIR/multimedia/sound_play.sh $soundfile + bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh $soundfile #hmmm: parameterize this for the sound to be played. doofus. echo "Got dumped from tunnels; re-establishing connection." echo "Note: if you're being asked for a password, you haven't set up an RSA key yet." diff --git a/scripts/security/tell_zooty_our_ip.sh b/scripts/security/tell_zooty_our_ip.sh index 73b7b22b..28107a24 100644 --- a/scripts/security/tell_zooty_our_ip.sh +++ b/scripts/security/tell_zooty_our_ip.sh @@ -12,7 +12,7 @@ tempdir=/tmp # where we generate our files. source $HOME/yeti/scripts/core/profile.sh -soundfile=$YETI_DIR/database/sounds/woouoo.wav +soundfile=$FEISTY_MEOW_DIR/database/sounds/woouoo.wav if [ ! -z "$1" ]; then soundfile=$1 fi diff --git a/scripts/system/osx_cd_mounter.sh b/scripts/system/osx_cd_mounter.sh index 91034b43..a83aa871 100644 --- a/scripts/system/osx_cd_mounter.sh +++ b/scripts/system/osx_cd_mounter.sh @@ -3,7 +3,7 @@ # keeps trying to mount the cd on a mac mini to overcome # a new bug in itunes seen as of osx leopard upgrade. -source $SHELLDIR/core/date_stringer.sh +source $FEISTY_MEOW_SCRIPTS/core/date_stringer.sh mountpoint=/Volumes/mounty_cd diff --git a/scripts/text/smoove_lists.sh b/scripts/text/smoove_lists.sh index ab212c11..aea57995 100644 --- a/scripts/text/smoove_lists.sh +++ b/scripts/text/smoove_lists.sh @@ -52,7 +52,7 @@ done <"$tempfile" rm "$tempfile" # clean out any directories that we managed to move everything out of. -perl "$SHELLDIR/files/zapdirs.pl" $source +perl "$FEISTY_MEOW_SCRIPTS/files/zapdirs.pl" $source popd &>/dev/null diff --git a/scripts/tty/keep_awake.sh b/scripts/tty/keep_awake.sh index ee6f5cf0..13c65715 100644 --- a/scripts/tty/keep_awake.sh +++ b/scripts/tty/keep_awake.sh @@ -6,4 +6,4 @@ # kind of snafu with the ksh environment variable $$ where it would always # record the previous shell's number and not the current one or something.... # -(bash $SHELLDIR/keep_awake_process.sh) & +(bash $FEISTY_MEOW_SCRIPTS/keep_awake_process.sh) & diff --git a/scripts/tty/keep_awake_process.sh b/scripts/tty/keep_awake_process.sh index 93041d81..9303fcb5 100644 --- a/scripts/tty/keep_awake_process.sh +++ b/scripts/tty/keep_awake_process.sh @@ -2,7 +2,7 @@ # This program is meant to be started by the program keep_awake and has # the basic guts that are meant to execute inside of a semi-perpetual loop. -source $SHELLDIR/core/date_stringer.sh +source $FEISTY_MEOW_SCRIPTS/core/date_stringer.sh # save the process id for the bye bye program to deal with. #echo $$ >>$TMP/trash.last_keep_awake_process diff --git a/scripts/tty/label_terminal_with_infos.sh b/scripts/tty/label_terminal_with_infos.sh index 69970796..9918c9f0 100644 --- a/scripts/tty/label_terminal_with_infos.sh +++ b/scripts/tty/label_terminal_with_infos.sh @@ -14,4 +14,4 @@ fi new_title="-- $user@$pruned_host -- [$date_string]" -bash "$SHELLDIR/tty/set_term_title.sh" "$new_title" +bash "$FEISTY_MEOW_SCRIPTS/tty/set_term_title.sh" "$new_title" diff --git a/scripts/tty/lockup.sh b/scripts/tty/lockup.sh index 201ce44f..e31357db 100644 --- a/scripts/tty/lockup.sh +++ b/scripts/tty/lockup.sh @@ -2,7 +2,7 @@ # Thanks to Kevin Wika for this shell. -source $SHELLDIR/core/date_stringer.sh +source $FEISTY_MEOW_SCRIPTS/core/date_stringer.sh trap '' HUP trap '' INT diff --git a/scripts/tty/ssh.sh b/scripts/tty/ssh.sh index 896afa4d..89bc923a 100644 --- a/scripts/tty/ssh.sh +++ b/scripts/tty/ssh.sh @@ -7,6 +7,6 @@ \ssh -i $HOME/.ssh/id_dsa_fred -X $* # re-run our terminal labeller. -bash $SHELLDIR/tty/label_terminal_with_infos.sh +bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh diff --git a/scripts/users/findme.sh b/scripts/users/findme.sh index 76f14eed..95487b13 100644 --- a/scripts/users/findme.sh +++ b/scripts/users/findme.sh @@ -3,4 +3,4 @@ snuser=$USER if [ -z "$snuser" ]; then snuser=$USERNAME; fi # more checks? what else would we get it from, REPLYTO? -bash "$SHELLDIR/users/find_user.sh" $snuser +bash "$FEISTY_MEOW_SCRIPTS/users/find_user.sh" $snuser -- 2.34.1