r67691 - /scripts/examples/check-build

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat Jan 22 15:33:17 UTC 2011


Author: gregoa
Date: Sat Jan 22 15:33:07 2011
New Revision: 67691

URL: http://svn.debian.org/wsvn/?sc=1&rev=67691
Log:
support for .debian.tar.bz2 (and native packages)

Modified:
    scripts/examples/check-build

Modified: scripts/examples/check-build
URL: http://svn.debian.org/wsvn/scripts/examples/check-build?rev=67691&op=diff
==============================================================================
--- scripts/examples/check-build (original)
+++ scripts/examples/check-build Sat Jan 22 15:33:07 2011
@@ -32,8 +32,6 @@
 fi
 
 FORMAT=$(grep ^Format: $DSC | cut -f2 -d" ")
-DIFFGZ=$BUILDDIR/${PACKAGE}_${VERSION}.diff.gz
-DEBGZ=$BUILDDIR/${PACKAGE}_${VERSION}.debian.tar.gz
 
 echo "lintian:"
 echo "========"
@@ -59,6 +57,11 @@
 
 PKGVER=$(echo ${PACKAGE}-${VERSION} | perl -pe 's;^(.+)(?:-.+)$;$1;')
 AUTOPATCH=debian/patches/debian-changes-${VERSION}
+DIFFGZ=$BUILDDIR/${PACKAGE}_${VERSION}.diff.gz
+DEBGZ=$BUILDDIR/${PACKAGE}_${VERSION}.debian.tar.gz
+DEBBZ2=$BUILDDIR/${PACKAGE}_${VERSION}.debian.tar.bz2
+[ -e "$DEBGZ" ] || DEBGZ="$DEBBZ2"
+
 if [ "$FORMAT" = "1.0" ] && zgrep -E "^\+\+\+ " "$DIFFGZ" | grep -v $PKGVER/debian > /dev/null; then
 	echo
 	echo "changes in .diff.gz outside debian/!"
@@ -69,12 +72,12 @@
 	echo
 	echo "maybe: mkdir -p debian/patches && diff2patches $DIFFGZ"
 	echo
-elif [ "$FORMAT" = "3.0" ] && tar tzvf "$DEBGZ" | grep -q "$AUTOPATCH"; then
+elif [ "$FORMAT" = "3.0" -a -e "$DEBGZ" ] && tar tvf "$DEBGZ" | grep -q "$AUTOPATCH"; then
 	echo
-	echo "automatically created patch in .debian.tar.gz!"
-	read -n 1 -p "extract patch from .debian.tar.gz? y/N " VIEWDEBGZ
+	echo "automatically created patch in .debian.tar.gz/.bz2!"
+	read -n 1 -p "extract patch from .debian.tar.gz/.bz? y/N " VIEWDEBGZ
 	if [ "$VIEWDEBGZ" = "y" ]; then
-		tar xzf "$DEBGZ" "$AUTOPATCH"
+		tar xf "$DEBGZ" "$AUTOPATCH"
 		cat "$AUTOPATCH"
 	fi
 	echo




More information about the Pkg-perl-cvs-commits mailing list