[Lunar-commits] <lunar> [MERGE] merge from theedge: alias bugfixes, performance improvements.

Auke Kok sofar at lunar-linux.org
Mon Jul 2 04:43:13 CEST 2012


commit 39b37d3aa4cab1d9a1115d61f78575b90e09bf2d
Author: Auke Kok <sofar at lunar-linux.org>
Date:   Wed Nov 8 15:49:27 2006 +0000

    [MERGE] merge from theedge: alias bugfixes, performance improvements.
---
 var/lib/lunar/functions/messages.lunar |   36 ++++++++++++++++----------------
 var/lib/lunar/functions/tracking.lunar |    2 +-
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/var/lib/lunar/functions/messages.lunar b/var/lib/lunar/functions/messages.lunar
index 9b03b17..2d587dd 100644
--- a/var/lib/lunar/functions/messages.lunar
+++ b/var/lib/lunar/functions/messages.lunar
@@ -37,42 +37,42 @@ error_message() {
 
 # normal messages go to stdout
 message() {
-  if [ -z "$SILENT" ] ; then
+  if [[ -z "$SILENT" ]] ; then
     echo -e "$*"
   fi
 }
 
 
 verbose_msg() {
-  if [ "$VERBOSE" == "on" ] ; then
-    message "+ $*"
+  if [[ "$VERBOSE" == "on" ]] ; then
+    message "+ $*" >&2
   fi
 }
 
 
 debug_msg() {
   local PLUSSES
-  if [ -n "$LUNAR_DEBUG" ] ; then
-    if [ "$LUNAR_DEBUG" -ge "2" ] ; then
-	  PLUSSES="+++++++++++++++++++++++++*"
-	  echo -n "${PLUSSES:0:${#FUNCNAME[@]}} " >&2
-	fi
-    if [ "$LUNAR_DEBUG" -ge "4" ] ; then
+  if [[ -n "$LUNAR_DEBUG" ]] ; then
+    if [[ "$LUNAR_DEBUG" -ge "2" ]] ; then
+          PLUSSES="+++++++++++++++++++++++++*"
+          echo -n "${PLUSSES:0:${#FUNCNAME[@]}} " >&2
+        fi
+    if [[ "$LUNAR_DEBUG" -ge "4" ]] ; then
       echo -n "$(basename $0)[$$]: " >&2
-	fi
-	if [ "$LUNAR_DEBUG" -ge "3" ] ; then
+        fi
+        if [[ "$LUNAR_DEBUG" -ge "3" ]] ; then
       echo -n "$(basename ${BASH_SOURCE[1]}):${BASH_LINENO[1]}: " >&2
-	fi
-    if [ "$LUNAR_DEBUG" -ge "2" ] ; then
-	  if [ "${FUNCNAME[1]}" != "$1" ]; then
-	    echo "$@" >&2
-	  else
+        fi
+    if [[ "$LUNAR_DEBUG" -ge "2" ]] ; then
+          if [[ "${FUNCNAME[1]}" != "$1" ]]; then
+            echo "$@" >&2
+          else
         echo "${FUNCNAME[1]} ($@)" >&2
-	  fi
+          fi
     else
       echo "++ $@" >&2
     fi
-    if [ "$LUNAR_DEBUG" -ge "5" ] ; then
+    if [[ "$LUNAR_DEBUG" -ge "5" ]] ; then
       echo "++ $@" >> $TMPDIR/lp_debuglog.$$
       if [ -f $TMPDIR/l_debug_var.$$ ] ; then
         mv $TMPDIR/l_debug_var.$$ $TMPDIR/l_debug_var.$$.old
diff --git a/var/lib/lunar/functions/tracking.lunar b/var/lib/lunar/functions/tracking.lunar
index ab632cb..361d53f 100644
--- a/var/lib/lunar/functions/tracking.lunar
+++ b/var/lib/lunar/functions/tracking.lunar
@@ -98,7 +98,7 @@ create_md5sum_log()  {
   rm -f $MD5SUM_LOGS/$MODULE-$VERSION &> /dev/null
   message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$MD5SUM_LOGS/$MODULE-$VERSION${DEFAULT_COLOR}"
 
-  files < $INSTALL_LOGS/$MODULE-$VERSION | xargs md5sum >> $MD5SUM_LOGS/$MODULE-$VERSION
+  IFS=$'\n' files < $INSTALL_LOGS/$MODULE-$VERSION | xargs -i md5sum '{}' >> $MD5SUM_LOGS/$MODULE-$VERSION
 }
 
 create_install_cache() {


More information about the Lunar-commits mailing list