[Fusionforge-commits] r13528 - branches/Branch_5_1/src/deb-specific

Thorsten Glaser mirabilos at fusionforge.org
Tue Jun 21 11:47:21 CEST 2011


Author: mirabilos
Date: 2011-06-21 11:47:21 +0200 (Tue, 21 Jun 2011)
New Revision: 13528

Modified:
   branches/Branch_5_1/src/deb-specific/install-chroot.sh
Log:
and now without the bashisms and actually doing any work


Modified: branches/Branch_5_1/src/deb-specific/install-chroot.sh
===================================================================
--- branches/Branch_5_1/src/deb-specific/install-chroot.sh	2011-06-21 09:12:26 UTC (rev 13527)
+++ branches/Branch_5_1/src/deb-specific/install-chroot.sh	2011-06-21 09:47:21 UTC (rev 13528)
@@ -7,7 +7,7 @@
 
 if [ $(id -u) != 0 ] ; then
     echo "You must be root to run this, please enter passwd"
-    exec su -c "$0 $1"
+    exec su -c "$0 $*"
 fi
 
 CHROOTDIR=$(/usr/share/gforge/bin/forge_get_config chroot)
@@ -71,10 +71,9 @@
 	    | sort -u \
 	    | cpio --quiet -pdumVLB $CHROOTDIR
 
-	for i in "/lib/ld-linux*.so.*" "/lib/libgcc_s*" "/lib/libcom_err*" "/toto/nrst*"; do
-	    if [ -n "$(shopt -s nullglob; echo $i)" ] ; then
-		echo cp $i $CHROOTDIR/lib
-	    fi
+	for i in /lib/ld-linux*.so.* /lib/libgcc_s* /lib/libcom_err* /toto/nrst*; do
+		test -e "$i" || continue
+		cp "$i" $CHROOTDIR/lib/
 	done
 
 	# Create devices files




More information about the Fusionforge-commits mailing list