diff --git a/README.rst b/README.rst index 5bd956f..840cc7f 100644 --- a/README.rst +++ b/README.rst @@ -104,7 +104,11 @@ The extra arguments after ``./build.sh B `` is extra deb files to pass to sbuild to use as dependencies. In this case, ``librust-A*.deb`` should have -been built by the previous step. +been built by the previous step. Alternatively, use the environment variable +``EXTRA_DEBS``, like so: :: + + $ EXTRA_DEBS=librust-A*.deb ./build.sh B + $ EXTRA_DEBS=librust-A.deb,librust-B.deb ./build.sh C After everything is built successfully, you can ``dput`` all of them and then push all the ``pending-*`` branches as normal. diff --git a/build.sh b/build.sh index 53e2ccb..d3d5d5e 100755 --- a/build.sh +++ b/build.sh @@ -16,6 +16,8 @@ # Build using another schroot than debcargo-unstable-amd64-sbuild # SBUILD_OPTS= # will pass to sbuild; for example SBUILD_OPTS=--arch=i386 +# EXTRA_DEBS +# Include extra dependency debs, e.g. EXTRA_DEBS=librust*.deb. set -e SCRIPTDIR="$(dirname $(readlink -f "$0"))" @@ -99,8 +101,12 @@ fi fi -EXTRA_DEBS=( "$@" ) -if [ -n "$*" -a -z "$IGNORE_MISSING_BUILD_DEPS" ]; then +# allow tab, comma, space as separators +IFS=' , ' read -r -a EXTRA_DEBS <<< "$EXTRA_DEBS" +if [ ${#EXTRA_DEBS[@]} -eq 0 ]; then + EXTRA_DEBS=( "$@" ) +fi +if [ ${#EXTRA_DEBS[@]} -ne 0 ]; then IGNORE_MISSING_BUILD_DEPS=1 echo >&2 "Given non-empty extra debs; defaulting IGNORE_MISSING_BUILD_DEPS=1" fi