easy deploy

This commit is contained in:
Simon Gardling
2022-02-11 09:47:07 -05:00
parent 4d7d8b1b00
commit a56165236e
3 changed files with 18 additions and 2 deletions

17
push.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -e #kill script if error occurs
wasm-pack build --target web --release
rm -fr tmp | true #delete tmp folder if exists
mkdir tmp
cp -r pkg www tmp/
mv tmp/www/index.html tmp/
sed -i 's/style.css/www\/style.css/g' tmp/index.html
sed -i 's/bootstrap.js/www\/bootstrap.js/g' tmp/index.html
echo "rsyncing"
rsync -av --delete --info=progress2 tmp/ rpi-public:/mnt/hdd/http_share/integrals/
rm -fr tmp