[SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (7b603e41fe184b660d3dba47734b4bb734efa2b6)

Justin Boffemmyer scm at sourcemage.org
Sat Mar 27 19:43:45 EDT 2010


GIT changes to master cauldron by Justin Boffemmyer <flux at sourcemage.org>:

 lib/libcolor |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 7b603e41fe184b660d3dba47734b4bb734efa2b6
Author: Justin Boffemmyer <flux at sourcemage.org>
Commit: Justin Boffemmyer <flux at sourcemage.org>

    libcolor: change $* for $@
    
    Use quoted $@ as it's a little more robust than $*.

diff --git a/lib/libcolor b/lib/libcolor
index f182202..7290289 100644
--- a/lib/libcolor
+++ b/lib/libcolor
@@ -41,7 +41,7 @@ LIBCOLOR_FILE_COLOR="${LIBCOLOR_BOLD}${LIBCOLOR_GREEN}"
 LIBCOLOR_SYMLINK_COLOR="${LIBCOLOR_BOLD}${LIBCOLOR_CYAN}"
 
 #-------------------------------------------------------------------------------
-## @param message
+## @param notice message
 ##
 ## Prints the given message in "notice" color.
 ##
@@ -50,17 +50,17 @@ function libcolor_notice() {
   if [[ "$LIBCOLOR_NOCOLOR" = "yes" ]]
   then
     echo -ne "$LIBCOLOR_BOLD"
-    echo -n "$*"
+    echo -n "$@"
     echo -ne "$LIBCOLOR_NORMAL"
   else
     echo -ne "$LIBCOLOR_NOTICE_COLOR"
-    echo -n "$*"
+    echo -n "$@"
     echo -ne "$LIBCOLOR_NORMAL_COLOR"
   fi
 }
 
 #-------------------------------------------------------------------------------
-## @param message
+## @param warning message
 ##
 ## Prints the given message in "warn" color.
 ##
@@ -69,11 +69,11 @@ function libcolor_warn() {
   if [[ "$LIBCOLOR_NOCOLOR" = "yes" ]]
   then
     echo -ne "$LIBCOLOR_BOLD"
-    echo -n "$*"
+    echo -n "$@"
     echo -ne "$LIBCOLOR_NORMAL"
   else
     echo -ne "$LIBCOLOR_WARN_COLOR"
-    echo -n "$*"
+    echo -n "$@"
     echo -ne "$LIBCOLOR_NORMAL_COLOR"
   fi
 }
@@ -88,11 +88,11 @@ function libcolor_error() {
   if [[ "$LIBCOLOR_NOCOLOR" = "yes" ]]
   then
     echo -ne "$LIBCOLOR_BOLD"
-    echo -n "$*"
+    echo -n "$@"
     echo -ne "$LIBCOLOR_NORMAL"
   else
     echo -ne "$LIBCOLOR_ERROR_COLOR"
-    echo -n "$*"
+    echo -n "$@"
     echo -ne "$LIBCOLOR_NORMAL_COLOR"
   fi
 }
@@ -106,10 +106,10 @@ function libcolor_error() {
 function libcolor_query() {
   if [[ "$LIBCOLOR_NOCOLOR" = "yes" ]]
   then
-    echo -n "$*"
+    echo -n "$@"
   else
     echo -ne "$LIBCOLOR_QUERY_COLOR"
-    echo -n "$*"
+    echo -n "$@"
     echo -ne "$LIBCOLOR_NORMAL_COLOR"
   fi
 }
@@ -123,10 +123,10 @@ function libcolor_query() {
 function libcolor_file() {
   if [[ "$LIBCOLOR_NOCOLOR" = "yes" ]]
   then
-    echo -n "$*"
+    echo -n "$@"
   else
     echo -ne "$LIBCOLOR_FILE_COLOR"
-    echo -n "$*"
+    echo -n "$@"
     echo -ne "$LIBCOLOR_NORMAL_COLOR"
   fi
 }
@@ -140,10 +140,10 @@ function libcolor_file() {
 function libcolor_symlink() {
   if [[ "$LIBCOLOR_NOCOLOR" = "yes" ]]
   then
-    echo -n "$*"
+    echo -n "$@"
   else
     echo -ne "$LIBCOLOR_SYMLINK_COLOR"
-    echo -n "$*"
+    echo -n "$@"
     echo -ne "$LIBCOLOR_NORMAL_COLOR"
   fi
 }



More information about the SM-Commit mailing list