Move scripts into /scripts directory and create a pw command for managing these scripts. Will re-name scripts to further prevent confusion (my own)

This commit is contained in:
Matt McWilliams 2022-07-22 10:46:45 -04:00
parent 1e2497a5ca
commit 15fb1cc7af
6 changed files with 34 additions and 11 deletions

View File

@ -1,8 +0,0 @@
#!/bin/bash
bash ./build_docker.sh
sudo docker run \
-v $PWD:/usr/src/build \
povray_wasm \
sh -c 'cd /usr/src/povray && cp ../build/build.sh build.sh && bash build.sh'

View File

@ -1,3 +0,0 @@
#!/bin/bash
sudo docker build -t povray_wasm --rm .

19
povray_wasm/pw Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
help () {
echo "Usage: ./pw [command]"
echo " "
echo "Commands:"
echo " build - Build the docker image with optional -f/--force"
echo " compile - Run the compilation process"
}
if [[ "${1}" == "build" ]]; then
bash ./scripts/build.sh "${2}"
elif [[ "${1}" == "cmd" ]]; then
bash ./scripts/cmd.sh ${@}
elif [[ "${1}" == "compile" ]]; then
bash ./scripts/compile.sh
else
help
fi

View File

@ -0,0 +1,9 @@
#!/bin/bash
if [[ "${1}" == "-f" ]] || [[ "${1}" == "--force" ]]; then
ARG="--no-cache"
else
ARG=""
fi
sudo docker build ${ARG} -t povray_wasm --rm .

View File

@ -0,0 +1,6 @@
#!/bin/bash
sudo docker run \
-v $PWD:/usr/src/build \
povray_wasm \
sh -c 'cd /usr/src/povray && cp /usr/src/build/build.sh build.sh && bash build.sh'