replicant-buildstage/replicant-buildstage.sh

22 lines
447 B
Bash
Raw Normal View History

2019-01-20 16:49:33 +00:00
#!/bin/bash
docker_image="adhoczone/replicant-buildstage"
source_directory="$PWD/source"
output_directory="$PWD/out"
if [[ "$1" == "attach" ]]; then
exec docker run --rm -it \
-v "$source_directory:/build" \
-v "$output_directory:/build/out" \
--entrypoint "/bin/bash" \
"$docker_image"
exit 0
fi
exec docker run --rm -it \
-v "$source_directory:/build" \
-v "$output_directory:/build/out" \
"$docker_image" \
"$@"