[Lunar-commits] <lunar> Added quotes around file arguments of wc

Peter de Ridder peter at lunar-linux.org
Sat Oct 26 19:12:19 CEST 2013


commit d8e9d8069d6b51d654bb70f925aab2c10c17f00d
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Tue, 22 Oct 2013 11:04:58 -0700
URL: https://github.com/lunar-linux/lunar/commit/d8e9d8069d6b51d654bb70f925aab2c10c17f00d

Added quotes around file arguments of wc
---
  libs/build.lunar     | +1/-1     
  libs/updatelog.lunar | +2/-2     
  prog/lvu             | +1/-1     
  3 files changed, 4 insertions(+), 4 deletions(-)

--- a/libs/build.lunar
+++ b/libs/build.lunar
@@ -309,7 +309,7 @@ default_cpan_build() {
 default_post_build() {
   debug_msg "default_post_build ($@)"
 
-  if [ $(wc -l $INSTALLWATCHFILE | awk '{print$1}') == "0" ] &&
+  if [ $(wc -l "$INSTALLWATCHFILE" | awk '{print$1}') == "0" ] &&
       [ "$PROFILE" != "yes" ] ; then
     message "${PROBLEM_COLOR}WARNING: ${DEFAULT_COLOR}${FILE_COLOR}BUILD${DEFAULT_COLOR}${PROBLEM_COLOR} does not call prepare_install or installs zero files!${DEFAULT_COLOR}"
   fi
--- a/libs/updatelog.lunar
+++ b/libs/updatelog.lunar
@@ -37,8 +37,8 @@ display_success_info() {
   local NUMSUCCESS NUMFAILURES
   debug_msg "display_success_info ($@)"
 
-  NUMSUCCESS=$(wc -l $TMP_LIN_SUCCESS | cut -d" " -f1)
-  NUMFAILURES=$(wc -l $TMP_LIN_FAIL | cut -d" " -f1)
+  NUMSUCCESS=$(wc -l "$TMP_LIN_SUCCESS" | cut -d" " -f1)
+  NUMFAILURES=$(wc -l "$TMP_LIN_FAIL" | cut -d" " -f1)
 
   message
   message  "${MESSAGE_COLOR}Lunar $1 completed at `date`${DEFAULT_COLOR}"
--- a/prog/lvu
+++ b/prog/lvu
@@ -858,7 +858,7 @@ show_info() {
     fi
     echo
     if [ -e $MOONBASE/$SECTION/$MODULE/services ] ; then
-      LINES="`wc -l $MOONBASE/$SECTION/$MODULE/services | cut -d' ' -f1`"
+      LINES="`wc -l "$MOONBASE/$SECTION/$MODULE/services" | cut -d' ' -f1`"
       echo -n "  Provides Service"
       if [ 1 -lt $LINES ]; then
         echo "s:"




More information about the Lunar-commits mailing list