diff --git a/README.md b/README.md index a085682..d77eef3 100644 --- a/README.md +++ b/README.md @@ -70,11 +70,11 @@ The latest prototype is in the folder `app-proto`. It includes both a user inter 1. From the `app-proto` folder, call `trunk build --release`. - Building in [release mode](https://doc.rust-lang.org/cargo/reference/profiles.html#release) produces an executable which is smaller and often much faster, but harder to debug and more time-consuming to build. -2. Use `bash` to run the packaging script `tools/package-for-deployment.bash`. +2. Use `sh` to run the packaging script `tools/package-for-deployment.sh`. - The script is location-independent, so you can do this from anywhere in the dyna3 repository. - The call from the top level of the repository is: ```bash - bash tools/package-for-deployment.bash + sh tools/package-for-deployment.sh ``` - This will overwrite or replace the files in `deploy/dyna3`. 3. Put the contents of `deploy/dyna3` in the folder on your server that the prototype will be served from. diff --git a/tools/package-for-deployment.bash b/tools/package-for-deployment.bash deleted file mode 100644 index 743a508..0000000 --- a/tools/package-for-deployment.bash +++ /dev/null @@ -1,16 +0,0 @@ -# set paths. this technique for getting the script location comes from -# `mklement0` on Stack Overflow -# -# https://stackoverflow.com/a/24114056 -# -tools=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")") -src="$tools/../app-proto/dist" -dest="$tools/../deploy/dyna3" - -# remove the old hash-named files -[ -e "$dest"/dyna3-*.js ] && rm "$dest"/dyna3-*.js -[ -e "$dest"/dyna3-*.wasm ] && rm "$dest"/dyna3-*.wasm -[ -e "$dest"/main-*.css ] && rm "$dest"/main-*.css - -# copy the distribution -cp -r "$src/." "$dest" diff --git a/tools/package-for-deployment.sh b/tools/package-for-deployment.sh new file mode 100644 index 0000000..fdda434 --- /dev/null +++ b/tools/package-for-deployment.sh @@ -0,0 +1,16 @@ +# set paths. this technique for getting the script location comes from +# `mklement0` on Stack Overflow +# +# https://stackoverflow.com/a/24114056 +# +TOOLS=$(dirname -- $0) +SRC="$TOOLS/../app-proto/dist" +DEST="$TOOLS/../deploy/dyna3" + +# remove the old hash-named files +[ -e "$DEST"/dyna3-*.js ] && rm "$DEST"/dyna3-*.js +[ -e "$DEST"/dyna3-*.wasm ] && rm "$DEST"/dyna3-*.wasm +[ -e "$DEST"/main-*.css ] && rm "$DEST"/main-*.css + +# copy the distribution +cp -r "$SRC/." "$DEST"