Make bash script work when called in other dirs

This commit is contained in:
Richard Feldman 2023-10-25 21:17:52 -04:00
parent 5fed22405b
commit 563713b4b8
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B

View file

@ -4,6 +4,12 @@
# NOTE run `bash www/build.sh` to cache local copy of fonts, and repl assets etc
## Get the directory of the currently executing script
DIR="$(dirname "$0")"
# Change to that directory
cd "$DIR" || exit
rm -rf dist/
cp -r ../build dist/
mkdir -p dist/wip