somewhat silly new command "whoareyou" that makes the computer divulge its name.
[feisty_meow.git] / scripts / core / functions.sh
index ab883d9d6e6bce61ced2ffb806a2d352595262e3..55a45aecb1dad37e8fac1907a1fa1dc5351a1915 100644 (file)
@@ -14,6 +14,7 @@ if [ $? -eq 0 ]; then
 fi
 
 if [ -z "$skip_all" ]; then
+
   if [ ! -z "$SHELL_DEBUG" ]; then
     echo function definitions begin...
   fi
@@ -62,7 +63,7 @@ if [ -z "$skip_all" ]; then
     fi
   }
 
-  # checks the result of the last command that was run, and if it failed,
+  # checks the result of the last command that was run, and if that failed,
   # then this complains and exits from bash.  the function parameters are
   # used as the message to print as a complaint.
   function check_result()
@@ -77,7 +78,6 @@ if [ -z "$skip_all" ]; then
   # locates a process given a search pattern to match in the process list.
   function psfind() {
     local -a patterns=("${@}")
-    mkdir $TEST_TEMP/grid_logs &>/dev/null
     local PID_DUMP="$(mktemp "$TMP/zz_pidlist.XXXXXX")"
     local -a PIDS_SOUGHT
     if [ "$OS" == "Windows_NT" ]; then
@@ -99,9 +99,6 @@ if [ -z "$skip_all" ]; then
       # we 'type' the file to get rid of the unicode result from wmic.
       cmd $flag type "$tmppid" >$PID_DUMP
       \rm "$tmppid"
-#      local CR='
-#'  # embedded carriage return.
-#      local appropriate_pattern="s/^.*  *\([0-9][0-9]*\)[ $CR]*\$/\1/p"
       local appropriate_pattern="s/^.*  *\([0-9][0-9]*\) *\$/\1/p"
       for i in "${patterns[@]}"; do
         PIDS_SOUGHT+=($(cat $PID_DUMP \
@@ -340,6 +337,16 @@ if [ -z "$skip_all" ]; then
     echo "copying custom overrides for $user"
     mkdir "$FEISTY_MEOW_GENERATED/custom" 2>/dev/null
     perl "$FEISTY_MEOW_SCRIPTS/text/cpdiff.pl" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_GENERATED/custom"
+    # set up any custom script files which we'll add as aliases.
+#    if [ -e "$FEISTY_MEOW_GENERATED/custom/scripts" ]; then
+#      echo removing older custom scripts.
+#      rm -rf "$FEISTY_MEOW_GENERATED/custom/scripts"
+#    fi
+    if [ -d "$FEISTY_MEOW_DIR/customizing/$user/scripts" ]; then
+      echo "copying custom scripts for $user"
+      cp -R "$FEISTY_MEOW_DIR/customizing/$user/scripts" "$FEISTY_MEOW_GENERATED/custom/"
+    fi
+    echo
     regenerate
   }