aboutsummaryrefslogtreecommitdiffstats
path: root/dist/linux/docker-buildtest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dist/linux/docker-buildtest.sh')
-rwxr-xr-xdist/linux/docker-buildtest.sh26
1 files changed, 14 insertions, 12 deletions
diff --git a/dist/linux/docker-buildtest.sh b/dist/linux/docker-buildtest.sh
index 919a314d6..a3f38a32c 100755
--- a/dist/linux/docker-buildtest.sh
+++ b/dist/linux/docker-buildtest.sh
@@ -10,13 +10,13 @@ set -e
for arg in "$@"; do
shift
case "$arg" in
- "--color"|"-color") set -- "$@" "-c";;
- "--grab"|"-grab") set -- "$@" "-g";;
- "--image"|"-image") set -- "$@" "-i";;
- "--build"|"-build") set -- "$@" "-b";;
- "--file"|"-file") set -- "$@" "-f";;
- "--taskid"|"-taskid") set -- "$@" "-t";;
- *) set -- "$@" "$arg"
+ "--color"|"-color") set -- "$@" "-c";;
+ "--grab"|"-grab") set -- "$@" "-g";;
+ "--image"|"-image") set -- "$@" "-i";;
+ "--build"|"-build") set -- "$@" "-b";;
+ "--file"|"-file") set -- "$@" "-f";;
+ "--taskid"|"-taskid") set -- "$@" "-t";;
+ *) set -- "$@" "$arg";;
esac
done
# Parse args
@@ -28,8 +28,10 @@ while getopts ":i:b:f:t:cg" opt; do
b) BLD=$OPTARG ;;
f) PKG_FILE=$OPTARG;;
t) TASK=$OPTARG;;
- \?) printf "$ANSI_RED[BUILD] Invalid option: -$OPTARG $ANSI_NOCOLOR\n" >&2; exit 1 ;;
- :) printf "$ANSI_RED[BUILD] Option -$OPTARG requires an argument $ANSI_NOCOLOR\n" >&2; exit 1 ;;
+ \?) printf "$ANSI_RED[BUILD] Invalid option: -$OPTARG $ANSI_NOCOLOR\n" >&2
+ exit 1 ;;
+ :) printf "$ANSI_RED[BUILD] Option -$OPTARG requires an argument $ANSI_NOCOLOR\n" >&2
+ exit 1 ;;
esac
done
@@ -45,7 +47,7 @@ printf "$ANSI_YELLOW[$TASK| BUILD] Docker run $DOCKER_IMG $BLD $PKG_FILE $ANSI_N
if [ -n "$GRAB_SRCS" ]; then
printf "$ANSI_YELLOW[$TASK| BUILD] Grab sources$ANSI_NOCOLOR\n"
-
+
p="mkdir /work && cd /work"
p="$p && curl -L https://github.com/tgingold/ghdl/archive/master.tar.gz | tar xz"
p="$p && mv ghdl-master/* ./ && rm -rf ghdl-master"
@@ -56,9 +58,9 @@ if [ -n "$GRAB_SRCS" ]; then
set -e
docker cp "ghdl_cmp:/work/$PKG_FILE" ./
docker rm ghdl_cmp
-
+
else
docker run --rm -tv $(pwd):/work:Z -w="/work" "$DOCKER_IMG" sh -c "./dist/linux/buildtest.sh $ENABLECOLOR-t $TASK -b $BLD -f $PKG_FILE"
-fi \ No newline at end of file
+fi