Run single commands using ./pw cmd
This commit is contained in:
parent
15fb1cc7af
commit
b76765b10d
|
@ -4,14 +4,15 @@ help () {
|
|||
echo "Usage: ./pw [command]"
|
||||
echo " "
|
||||
echo "Commands:"
|
||||
echo " build - Build the docker image with optional -f/--force"
|
||||
echo " build - Build the docker image with optional -f/--force"
|
||||
echo " cmd - Run container with single command"
|
||||
echo " compile - Run the compilation process"
|
||||
}
|
||||
|
||||
if [[ "${1}" == "build" ]]; then
|
||||
bash ./scripts/build.sh "${2}"
|
||||
elif [[ "${1}" == "cmd" ]]; then
|
||||
bash ./scripts/cmd.sh ${@}
|
||||
bash ./scripts/cmd.sh "${2}"
|
||||
elif [[ "${1}" == "compile" ]]; then
|
||||
bash ./scripts/compile.sh
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo docker run \
|
||||
-v $PWD:/usr/src/build \
|
||||
-v $PWD/compile_povray_wasm.sh:/usr/src/povray/compile_povray_wasm.sh \
|
||||
povray_wasm \
|
||||
sh -c 'cd /usr/src/povray && cp /usr/src/build/build.sh build.sh && bash build.sh'
|
||||
sh -c 'cd /usr/src/povray && bash compile_povray_wasm.sh'
|
Loading…
Reference in New Issue