i=Alexey.Lyashkov
i=Robert.Read
process tar's rc correctly
echo "copying necessary libs to $DIR"
cp `which dbench` $DIR
LIBS71=$(ldd $DIR/dbench|sed -e 's/\t*//' -e 's/.*=> //' -e 's/ .*//' -e 's/^\///')
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
RUN="chroot $DIR"
PREFIX="in"
PATH=.:/:$PATH