fix for set -e
authorLudwig Nussel <ludwig.nussel@suse.de>
Thu, 10 Dec 2009 15:41:33 +0000 (16:41 +0100)
committerLudwig Nussel <ludwig.nussel@suse.de>
Thu, 10 Dec 2009 15:55:47 +0000 (16:55 +0100)
common_functions

index 6f0fe9c..8a67511 100644 (file)
@@ -18,9 +18,9 @@ set_build_arch()
     if test "$BUILD_ARCH" != "${BUILD_ARCH#i686}" ; then
        cpuflags=`grep ^flags /proc/cpuinfo`
        cpuflags="$cpuflags "
-       test "$cpuflags" = "${cpuflags/ cx8 /}" -o "$cpuflags" = "${cpuflags/ cmov /}" && {
+       if test "$cpuflags" = "${cpuflags/ cx8 /}" -o "$cpuflags" = "${cpuflags/ cmov /}"; then
            echo "Your cpu doesn't support i686 rpms. Exit."
-           exit 1
-       }
+           cleanup_and_exit 1
+       fi
     fi
 }