3 read -rd "\000" helpmessage <<EOF
4 $(basename $0): Orchestrate run-build-packages.sh for every target
7 WORKSPACE=/path/to/arvados $(basename $0) [options]
12 Build command to execute (default: use built-in Docker image command)
14 Run package install tests
16 Output debug information (default: false)
18 WORKSPACE=path Path to the Arvados source tree to build packages from
22 if ! [[ -n "$WORKSPACE" ]]; then
23 echo >&2 "$helpmessage"
25 echo >&2 "Error: WORKSPACE environment variable not set"
30 if ! [[ -d "$WORKSPACE" ]]; then
31 echo >&2 "$helpmessage"
33 echo >&2 "Error: $WORKSPACE is not a directory"
40 PARSEDOPTS=$(getopt --name "$0" --longoptions \
41 help,test-packages,debug,command: \
51 eval set -- "$PARSEDOPTS"
52 while [ $# -gt 0 ]; do
55 echo >&2 "$helpmessage"
66 TEST_PACKAGES="--test-packages"
70 echo >&2 "$0: unrecognized argument '$2'. Try: $0 --help"
80 for dockerfile_path in $(find -name Dockerfile); do
81 ./run-build-packages-one-target.sh --target "$(basename $(dirname "$dockerfile_path"))" --command "$COMMAND" $DEBUG $TEST_PACKAGES