cleaning up revision control tools
[feisty_meow.git] / scripts / core / functions.sh
index 90afe19c3b5cf7544bc943ce7d4ee27118ea6fef..6f02ae26160a62b4f6abc0b7d31104a8a7195993 100644 (file)
@@ -83,21 +83,10 @@ if [ -z "$skip_all" ]; then
   # when passed a list of things, this will return the unique items from that list as an echo.
   function uniquify()
   {
-##    # change the eol character so things are easier.
-
-sep >>~/uniquify.out
-echo "$(date): list before uniquify: $*" >>~/uniquify.out
-
-##    HOLDIFS="$IFS"
-##    IFS=' '
-
-    # do the uniquification.
-    local chewed="$(echo $* | tr ' ' '\n' | sort | uniq)"
-    echo $chewed
-echo "$(date): list after uniquify: $chewed" >>~/uniquify.out
-
-##    # return the former eol characters to their place.
-##    IFS="$HOLDIFS"
+    # do the uniquification: split the space separated items into separate lines, then
+    # sort the list, then run the uniq tool on the list.  results will be packed back onto
+    # one line when invoked like: local fredlist="$(uniquify a b c e d a e f a e d b)"
+    echo $* | tr ' ' '\n' | sort | uniq
   }
 
   # sets the variable in parameter 1 to the value in parameter 2, but only if
@@ -358,7 +347,7 @@ echo "$(date): list after uniquify: $chewed" >>~/uniquify.out
 #    fi
   }
   
-  # trashes the .#blah files that cvs and svn leave behind when finding conflicts.
+  # trashes the .#blah files that cvs and subversion 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