From 3efdfbf0af94e822072ab466d0511df14affb32b Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Tue, 23 Oct 2012 12:03:15 +0100 Subject: [PATCH] Ensure scan file download is properly validated and fix to cope with new PPA name due to launchpad crap! --- support/launchpad-ppa | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/support/launchpad-ppa b/support/launchpad-ppa index 43f8f453..cf3c0762 100755 --- a/support/launchpad-ppa +++ b/support/launchpad-ppa @@ -5,9 +5,15 @@ # environment variables # +# Terminate +function die +{ + echo $* + exit 1 +} + # CMD CMD=$(basename $0) -echo $CMD # Configuration TVH_ROOT=$(cd $(dirname $0)/..; pwd) @@ -29,15 +35,14 @@ VERFILE=$TVH_ROOT/src/version.c VER=$($TVH_ROOT/support/version $VERFILE) # Fetch scan files -./support/getmuxlist +./support/getmuxlist || die "failed to fetch dvb-scan files" # For each distro for d in $TVH_DIST; do V=${VER}~${d} - echo $V # Create changelog - $TVH_ROOT/support/changelog "$CHANGELOG" "$d" "$VER" + $TVH_ROOT/support/changelog "$CHANGELOG" "$d" "$VER" || exit 1 # Build source package dpkg-buildpackage -I.git* -S -sgpg -pgpg || exit 1 @@ -51,7 +56,7 @@ for d in $TVH_DIST; do # Upload else - dput tvh-$PPA ../tvheadend_${V}_source.changes || exit 1 + dput $DPUT_OPT tvh-${PPA} ../tvheadend_${V}_source.changes || exit 1 fi done