From: martin f. krafft Date: Tue, 21 Jul 2009 12:05:47 +0000 (+0200) Subject: enable fetching of orig tarball if missing X-Git-Url: https://git.madduck.net/code/mbuild.git/commitdiff_plain/86244fc270ae41396fc57e3fd2b782a1cd47f900?hp=5b3058d05388b5c448897a7209f415d4860cabf7 enable fetching of orig tarball if missing Signed-off-by: martin f. krafft --- diff --git a/sbuild-wrapper.sh b/sbuild-wrapper.sh index 3f5a2ee..6b90845 100755 --- a/sbuild-wrapper.sh +++ b/sbuild-wrapper.sh @@ -105,7 +105,9 @@ fi dist="$(sed -ne 's,Distribution: ,,p' "$schangesfile")" schangesfile_basename="${schangesfile##*/}" +packagename="${schangesfile_basename%%_*}" packagenameversion="${schangesfile_basename%_*}" +dscfile_basename="$packagenameversion".dsc case "$schangesfile" in */*) cd "${schangesfile%/*}";; @@ -116,10 +118,22 @@ schangesfile="$schangesfile_basename" cd "$BUILDDIR" +dcmd "$dscfile_basename" | while read f; do + test -f "$f" && continue + + case "$f" in + *.tar.gz) apt-get --tar-only --only-source source "$packagename";; + *) + echo "E: I do not know how to obtain the file: $f" >&2 + exit 1 + ;; + esac +done + [ "$binonly" = 0 ] && sbuild_args="${sbuild_args:+$sbuild_args }--source --arch-all" sbuild $sbuild_args --arch="$arch" --dist="$dist" --keyid=$KEYID \ - "$packagenameversion".dsc + "$dscfile_basename" changesfile="${packagenameversion}_${arch}.changes"