summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dbg_mkrpm14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/dbg_mkrpm b/scripts/dbg_mkrpm
index dbeafbfd..c3dbcf84 100755
--- a/scripts/dbg_mkrpm
+++ b/scripts/dbg_mkrpm
@@ -35,11 +35,12 @@ cp "$SRCDIR"/abrt.init "$BUILDDIR"
cp "$SRCDIR"/abrt-ccpp.init "$BUILDDIR"
#cp "$SRCDIR"/dbg_* "$BUILDDIR" 2>/dev/null # developers' toys
+{
+
cd "$BUILDDIR" || exit 1
# Build them
-# Less ugly way to pass exitcode (without bashisms)?
-{ nice -n10 rpmbuild \
+nice -n10 rpmbuild \
--define "_topdir $PWD" \
--define "_builddir $PWD" \
--define "_rpmdir $PWD" \
@@ -48,8 +49,9 @@ cd "$BUILDDIR" || exit 1
--define "_srcrpmdir $PWD" \
--define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
-bb abrt.spec 2>&1
-echo $? >"EXITCODE"
+echo "Exitcode: $?"
+
} | tee -a "$0.log"
-ret=`cat EXITCODE`
-rm EXITCODE
-exit "$ret"
+
+test x"`tail -n 1 "$0.log"`" = x"Exitcode: 0"
+exit $?