update push script

This commit is contained in:
Simon Gardling
2022-02-14 13:31:43 -05:00
parent d92bb3644d
commit a63c2369a0

10
push.sh
View File

@@ -6,13 +6,11 @@ wasm-pack build --target web --release
rm -fr tmp | true #delete tmp folder if exists
mkdir tmp tmp/pkg tmp/www
cp -r pkg/integral_site_bg.wasm pkg/integral_site_bg.wasm.d.ts pkg/integral_site.d.ts pkg/integral_site.js tmp/pkg/
cp www/bootstrap.js www/index.html www/index.js www/style.css tmp/www/
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
cp www/bootstrap.js www/index.html www/index.js www/style.css tmp/
# mv tmp/www/index.html tmp/
sed -i 's/\.\.\/pkg/\.\/pkg/g' tmp/bootstrap.js
echo "rsyncing"
rsync -av --delete --info=progress2 tmp/ rpi-public:/mnt/hdd/http_share/integrals/
rsync -av --delete --info=progress2 tmp/ rpi-public:/mnt/hdd/http_share/integral-demo/
rm -fr tmp