Skip to content

Commit

Permalink
build-openscad-wasm.sh fix: docker won't mount files outside home dir…
Browse files Browse the repository at this point in the history
…ectory
  • Loading branch information
ochafik committed Jul 17, 2024
1 parent 921ced5 commit bdcf1de
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions build-openscad-wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euo pipefail

if [ -z "${OPENSCAD_DIR:-}" ]; then
OPENSCAD_DIR=/tmp/openscad-color
OPENSCAD_DIR=~/tmp/openscad-color
if [ ! -d "$OPENSCAD_DIR" ]; then
rm -fR "$OPENSCAD_DIR"
git clone --recurse https://github.com/ochafik/openscad.git \
Expand All @@ -11,11 +11,10 @@ if [ -z "${OPENSCAD_DIR:-}" ]; then
fi
fi

( cd "$OPENSCAD_DIR" &&
docker run --rm -it -v "$PWD":/src:rw --platform=linux/amd64 openscad/wasm-base:latest \
emcmake cmake -B build -DEXPERIMENTAL=ON "$@" && \
docker run --rm -it -v "$PWD":/src:rw --platform=linux/amd64 openscad/wasm-base:latest \
cmake --build build -j10 )
docker run --rm -it -v "$OPENSCAD_DIR":/src:rw --platform=linux/amd64 openscad/wasm-base:latest \
emcmake cmake -B build -DEXPERIMENTAL=ON "$@"
docker run --rm -it -v "$OPENSCAD_DIR":/src:rw --platform=linux/amd64 openscad/wasm-base:latest \
cmake --build build -j10

rm -fR libs/openscad-wasm
mkdir -p libs/openscad-wasm
Expand Down

0 comments on commit bdcf1de

Please sign in to comment.