- 'test' doesn't short circuit properly
authorMichael Schröder <mls@suse.de>
Tue, 16 Dec 2008 10:01:27 +0000 (10:01 +0000)
committerMichael Schröder <mls@suse.de>
Tue, 16 Dec 2008 10:01:27 +0000 (10:01 +0000)
build

diff --git a/build b/build
index ffc6d00..af9930f 100755 (executable)
--- a/build
+++ b/build
@@ -1098,7 +1098,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do
     BUILD_USER=abuild
     if test -x $BUILD_ROOT/bin/rpm ; then
        SUSE_VERSION=`chroot $BUILD_ROOT /bin/rpm --eval '%{?suse_version}' 2>/dev/null`
-       if test -n "$SUSE_VERSION" -a "$SUSE_VERSION" -le 1020 ; then
+       if test -n "$SUSE_VERSION" && test "$SUSE_VERSION" -le 1020 ; then
            BUILD_USER=root
        fi
     fi