summaryrefslogtreecommitdiffstats
path: root/scripts/dbg_mkrpm
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-11-02 14:46:25 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-11-02 14:46:25 +0100
commitb725e7178f99621988f4913d5967be830d7a5834 (patch)
treed37a0bfeb786b5148b93c2a07003e08cbbc01b26 /scripts/dbg_mkrpm
parent68e616def90ece3bdde925dc106e51e8560fa05d (diff)
downloadabrt-b725e7178f99621988f4913d5967be830d7a5834.tar.gz
abrt-b725e7178f99621988f4913d5967be830d7a5834.tar.xz
abrt-b725e7178f99621988f4913d5967be830d7a5834.zip
adding scripts/* - haphazard collection of debug tools
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/dbg_mkrpm')
-rwxr-xr-xscripts/dbg_mkrpm27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/dbg_mkrpm b/scripts/dbg_mkrpm
new file mode 100755
index 00000000..28b040e5
--- /dev/null
+++ b/scripts/dbg_mkrpm
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+test -f abrt.spec || exit 1
+ABRTVER=`grep ^Version: abrt.spec | head -n1 | sed 's/.* //'`
+
+if ! test -f configure; then
+ echo "Autogenerating configure"
+ ./autogen.sh || { rm -f configure; exit 1; }
+fi
+
+
+T=/tmp/$$_$RANDOM
+test -d "$T" && exit 1
+
+rm -rf BUILDROOT "abrt-$ABRTVER" "abrt-$ABRTVER".tar "abrt-$ABRTVER".tar.gz \
+ abrt*.rpm \
+ 2>/dev/null
+
+mkdir -p "$T"/"abrt-$ABRTVER" || exit
+cp -a * "$T"/"abrt-$ABRTVER" || exit
+(cd "$T" && tar -c "abrt-$ABRTVER") >"abrt-$ABRTVER".tar || exit
+rm -rf "$T" || exit
+
+gzip "abrt-$ABRTVER".tar || exit
+
+
+./dbg_rpmbuildlocal -bb abrt.spec 2>&1 | tee -a "$0.log"