At Wednesday 22 November 2006 16:38, you wrote:
> Hi,
>
[snip]
> can you provide a unified diff for easier review?
>
attached.
the hack uses '/usr/bin/file'..(deps?)
- Frode
--- /usr/bin/dpatch-get-origtargz 2006-06-15 23:24:00.000000000 +0200
+++ dpatch-get-repack-origtargz 2006-11-22 18:53:15.000000000 +0100
@@ -56,6 +56,20 @@
echo >&2 "${DPGO_BASENAME}: Error: cannot curl $ORIGTARGZ from debian/watch location"
fi
+# start: hack by Frode M. Døving <[EMAIL PROTECTED]> to use with dpatch-get-origtargz
+# when watch file refers to a orig.tar.bz2 archive. This will bunzip and gzip -9
+
+if [ `file -bi "${ORIGTARDIR}/$ORIGTARGZ"` = 'application/x-bzip2' ]; then
+ /bin/bunzip2 -q "${ORIGTARDIR}/$ORIGTARGZ"
+ for i in "${ORIGTARDIR}/$ORIGTARGZ.out" ;do mv $i ${i%%.gz.out};/bin/gzip -9 ${i%%.gz.out};done
+ exit 0
+else
+ echo "Nothing to do."
+ exit 0
+fi
+
+# end: hack
+
if [ ! -f "${ORIGTARDIR}/$ORIGTARGZ" ]; then
echo >&2 "${DPGO_BASENAME}: Error: unable to obtain $ORIGTARGZ from anywhere"
exit 1