cleaning and moving a lot of files.
[feisty_meow.git] / scripts / core / functions.sh
index 45cc1b88884eb985c6b8a58a22ea34c3f03f20ff..a8f570a09b3e7d5c554384076cabef61d35c8c9e 100644 (file)
@@ -6,6 +6,10 @@ if [ ! -z "$SHELL_DEBUG" ]; then
   echo function definitions begin...
 fi
 
+# a handy little method that can be used for date strings.  it was getting
+# really tiresome how many different ways the script did the date formatting.
+function date_stringer() { date +"%Y_%m_%e_%H%M_%S" | tr -d '/\n/' }
+
 # makes a directory of the name specified and then tries to change the
 # current directory to that directory.
 function mcd {
@@ -115,7 +119,7 @@ function su {
     # information for su.
 
     # get the x authority info for our current user.
-    source $SHELLDIR/x_win/get_x_auth.sh
+    source $FEISTY_MEOW_SCRIPTS/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.
@@ -132,7 +136,7 @@ function su {
   fi
 
   # relabel the console after returning.
-  bash $SHELLDIR/tty/label_terminal_with_infos.sh
+  bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
 }
 
 # sudo function wraps the normal sudo by ensuring we replace the terminal
@@ -142,7 +146,7 @@ function sudo {
   /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
+    bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
   fi
 }
 
@@ -170,7 +174,7 @@ function buntar {
 # 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 {} ";" 
+    find $i -follow -type f -iname ".#*" -exec perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl {} ";" 
   done
 }