mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +00:00
9bb3d6b972
git-subtree-dir: sgx-jvm/avian git-subtree-mainline:f978eab8d1
git-subtree-split:09e4fe60d0
42 lines
866 B
Bash
Executable File
42 lines
866 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if test $# -eq 0; then
|
|
echo "Usage: $0 [--container <container_name>] -- <command_to_run_in_docker>"
|
|
echo "Ex: $0 make test"
|
|
echo "Ex: $0 ./test/ci.sh"
|
|
echo "Ex: $0 --container joshuawarner32/avian-build-windows -- make platform=windows"
|
|
exit 1
|
|
fi
|
|
|
|
THE_USER="-u $(id -u "${USER}")"
|
|
|
|
while test $# -gt 1 ; do
|
|
key="$1"
|
|
case $key in
|
|
-c|--container)
|
|
shift
|
|
CONTAINER="$1"
|
|
shift
|
|
;;
|
|
-r|--root)
|
|
shift
|
|
THE_USER=
|
|
;;
|
|
--)
|
|
shift
|
|
break
|
|
;;
|
|
*)
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if test -z $CONTAINER; then
|
|
CONTAINER=joshuawarner32/avian-build
|
|
fi
|
|
|
|
DIR=$(cd $(dirname "$0") && cd .. && pwd)
|
|
|
|
docker run --rm -i -t -v "${DIR}":/var/src/avian ${THE_USER} "${CONTAINER}" "${@}"
|