From 0a2c4104a6288cded4592c613122a7dc87debe41 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 15 May 2009 11:14:01 +0200 Subject: [PATCH 1/1] determine default dist from changes file --- sbuild-wrapper.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sbuild-wrapper.sh b/sbuild-wrapper.sh index 243587d..02edbc2 100755 --- a/sbuild-wrapper.sh +++ b/sbuild-wrapper.sh @@ -54,7 +54,7 @@ usage() echo echo "Valid options are:" cat <<-_eof | column -s\& -t - --dist & specify the target distribution (default: sid) + --dist & specify the target distribution (default: from changes file) --arch & specify the target architecture (default: $DEB_BUILD_ARCH) -sa & pass --force-orig-source to sbuild -B & do a binary-only build @@ -67,13 +67,11 @@ binonly=0 sbuild_args= schangesfile= arch= -dist= for opt in "$@"; do case "$opt" in -h|--help) usage; exit 0;; -V|--version) about; exit 0;; --arch=*) arch="${opt#--arch=}";; - --dist=*) dist="${opt#--dist=}";; -sa) sbuild_args="${sbuild_args:+$sbuild_args }--force-orig-source";; -B) binonly=1;; --*) sbuild_args="${sbuild_args:+$sbuild_args }$opt";; @@ -103,7 +101,8 @@ if [ -z "$schangesfile" ]; then fi [ -z "$arch" ] && arch="$DEB_BUILD_ARCH" -[ -z "$dist" ] && dist="unstable" + +dist="$(sed -ne 's,Distribution: ,,p' "$schangesfile")" schangesfile_basename="${schangesfile##*/}" packagenameversion="${schangesfile_basename%_*}" -- 2.39.5