All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
3 # mbuild - make sbuild and reprepro work together
5 # Copyright (c) 2008 martin f. krafft <madduck@debian.org>
6 # Released under the terms of the Artistic Licence 2.0.
10 BUNDLEDIR="$HOME/reprepro/bundles"
11 REPREPRODIR="$HOME/reprepro"
13 DINSTALL="reprepro --basedir $REPREPRODIR include \$dist"
15 GNUPGHOME="$REPREPRODIR/.gnupg"; export GNUPGHOME
27 --arch=*) arch="${opt#--arch=}";;
28 --dist=*) dist="${opt#--dist=}";;
29 -sa) sbuild_args="${sbuild_args:+$sbuild_args }--force-orig-source";;
30 --*) sbuild_args="${sbuild_args:+$sbuild_args }$opt";;
32 if [ -z "$schangesfile" ]; then
33 if [ -f "$opt" ] && [ -r "$opt" ]; then
36 echo "E: file does not exist: $opt" >&2
40 echo "E: cannot pass more than one source changes file: $opt" >&2
45 echo "E: unknown option: $opt" >&1
51 schangesfile_basename="${schangesfile##*/}"
52 packagenameversion="${schangesfile_basename%_*}"
54 builddir="$(mktemp -dp "$DIR" "${packagenameversion}.XXXXXXXX")"
55 trap "rm -R '$builddir'" 0
57 cd "${schangesfile%/*}"
58 dcmd cp "${schangesfile##*/}" "$builddir"
59 schangesfile="$schangesfile_basename"
63 sbuild $sbuild_args --arch="$arch" --arch-all --dist="$dist" --keyid=$KEYID \
64 "$packagenameversion".dsc
66 changesfile="${packagenameversion}_${arch}.changes"
70 eval $DINSTALL "$schangesfile"
71 eval $DINSTALL "$changesfile"
73 mv "$changesfile" "${changesfile}.binonly"
74 mergechanges "$schangesfile" "${changesfile}.binonly" > "$changesfile"
75 rm "${changesfile}.binonly" "$schangesfile"
77 bundle="$BUNDLEDIR/${packagenameversion}.bundle.tar"
78 dcmd tar -chf "$bundle" "$changesfile"
83 echo "Bundle available at $bundle"