22 lines
447 B
Bash
Executable File
22 lines
447 B
Bash
Executable File
#!/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" \
|
|
"$@"
|
|
|