dyna3/tools/package-demo
Aaron Fenyes b058cb984d Write a packaging script for the demo app
For flexible staging and deployment, tell Trunk to use relative URLs.
2025-06-12 13:03:09 -07:00

18 lines
577 B
Bash
Executable file

#!/bin/bash
# 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")")
dist_src="$tools/../app-proto/dist"
dist_dest="$tools/../demo-summer-2025/dyna3"
# remove the old hash-named files
[ -e "$dist_dest"/dyna3-*.js ] && rm "$dist_dest"/dyna3-*.js
[ -e "$dist_dest"/dyna3-*.wasm ] && rm "$dist_dest"/dyna3-*.wasm
[ -e "$dist_dest"/main-*.css ] && rm "$dist_dest"/main-*.css
# copy the distribution
cp -r "$dist_src/." "$dist_dest"