[Lunar-commits] <lunar> Use -d for xargs in lvu

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


commit f7469e58369499a07ff7880165130f4c4afa7315
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Tue, 22 Oct 2013 10:55:50 -0700
URL: https://github.com/lunar-linux/lunar/commit/f7469e58369499a07ff7880165130f4c4afa7315

Use -d for xargs in lvu
---
  prog/lvu | +3/-3     
  1 file changed, 3 insertions(+), 3 deletions(-)

--- a/prog/lvu
+++ b/prog/lvu
@@ -1056,7 +1056,7 @@ edit_module()
 			else
 				cp -a $MOONBASE/$SECTION/$1 $MOONBASE/zlocal/
 				# clean out SCM directories
-				find $MOONBASE/zlocal/$1 -type d -name CVS -o -name .svn | xargs rm -rf
+				find $MOONBASE/zlocal/$1 -type d -name CVS -o -name .svn -exec rm -rf '{}' +
 				message "Copied \"$1\" from \"$SECTION\""
 				message "Edit your module in \"$MOONBASE/zlocal/$1\""
 			fi
@@ -1458,7 +1458,7 @@ main()  {
         if [ -f $MOONBASE/$SEC/$MOD/services ] ; then
           echo $MOONBASE/$SEC/$MOD/services
         fi
-      done | xargs egrep -l -i "$2" | sed "s;${MOONBASE}/\(.*\)/services;\1;"
+      done | xargs -d '\n' egrep -l -i "$2" | sed "s;${MOONBASE}/\(.*\)/services;\1;"
       ;;
 
     depends)
@@ -1580,7 +1580,7 @@ main()  {
    links)
      [[ -z "$2" ]] && return 1
 
-     REGEX=$(lvu install $2 | xargs file | awk -F: '/ELF/ { print $1 }' | xargs ldd | fgrep '=>' | cut -d' ' -f3 | sort | uniq)
+     REGEX=$(lvu install $2 | xargs -d '\n' file | awk -F: '/ELF/ { print $1 }' | xargs -d '\n' ldd | fgrep '=>' | cut -d' ' -f3 | sort | uniq)
 
      pushd $INSTALL_LOGS >/dev/null
      fgrep -xl "$REGEX" *




More information about the Lunar-commits mailing list