moved the recustomize alias into being a function, which allows it to support parameters.
[feisty_meow.git] / scripts / core / functions.sh
index aa9c512a918cfa91703226c4f77a1efe413b85d4..ae3fd1c173c139add14032b2a06eaa7d321fcdff 100644 (file)
@@ -264,6 +264,27 @@ if [ -z "$skip_all" ]; then
     echo
   }
 
+  # copies a set of custom scripts into the proper location for feisty meow
+  # to merge their functions and aliases with the standard set.
+  function recustomize()
+  {
+    user="$1"; shift
+    if [ -z "$user" ]; then
+      # use our default example user if there was no name provided.
+      user=fred
+    fi
+    if [ ! -d "$FEISTY_MEOW_DIR/customizing/$user" ]; then
+      echo "The customization folder provided for $user should be:"
+      echo "  '$FEISTY_MEOW_DIR/customizing/$user'"
+      echo "but that folder does not exist.  Skipping customization."
+      return 1
+    fi
+    regenerate >/dev/null
+    echo "copying custom overrides for $user"
+    perl "$FEISTY_MEOW_SCRIPTS/text/cpdiff.pl" "$FEISTY_MEOW_DIR/customizing/$user" "$FEISTY_MEOW_GENERATED/custom"
+    regenerate
+  }
+
   function function_sentinel() { return 0; }
   
   if [ ! -z "$SHELL_DEBUG" ]; then echo function definitions end....; fi