Whamcloud - gitweb
b=20074
authorgrev <grev>
Thu, 9 Jul 2009 08:27:53 +0000 (08:27 +0000)
committergrev <grev>
Thu, 9 Jul 2009 08:27:53 +0000 (08:27 +0000)
i=Alexey.Lyashkov
i=Robert.Read
process tar's rc correctly

lustre/tests/rundbench

index 57651f5..d4d6963 100755 (executable)
@@ -60,8 +60,12 @@ if [ "x$CHROOT" == "xyes" ]; then
        echo "copying necessary libs to $DIR"
        cp `which dbench` $DIR
        LIBS71=$(ldd $DIR/dbench|sed -e 's/\t*//' -e 's/.*=> //' -e 's/ .*//' -e 's/^\///')
-       (cd / && tar chf - $LIBS71) | (cd $DIR && tar xvf -)
-       [ $? != 0 ] && echo "can't copy libs $LIBS71 to $DIR" && exit 1
+       tar -C / -chf - $LIBS71 | tar -C $DIR -xvf -
+       if [ "${PIPESTATUS[*]}" != "0 0" ]; then
+               echo "can't copy libs $LIBS71 to $DIR"
+               rm -f $DIR/dbench
+               exit 1
+       fi
        RUN="chroot $DIR"
        PREFIX="in"
        PATH=.:/:$PATH