Skip to content

Commit

Permalink
builder-docker-otp: Fix passing of command
Browse files Browse the repository at this point in the history
Pass all argument except the first as the command for "docker run".
  • Loading branch information
bjorng committed Mar 8, 2017
1 parent cc96d25 commit c1dab09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/build-docker-otp
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/bash

if [ $# -lt 1 ]; then
echo "Usage $0 32|64 [command]"
echo "Usage $0 32|64 [command] [arg]..."
exit 1
fi

ARCH="$1"
shift

git archive --format=tar.gz --prefix=otp/ HEAD >otp.tar.gz

docker build -t otp --file scripts/Dockerfile.$ARCH .
docker run --volume="$PWD/logs:/buildroot/otp/logs" -i --rm otp $2
docker run --volume="$PWD/logs:/buildroot/otp/logs" -i --rm otp ${1+"$@"}

0 comments on commit c1dab09

Please sign in to comment.