From a56165236e3c74f40d86e34e9f5fc02d3fbb17ed Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Fri, 11 Feb 2022 09:47:07 -0500 Subject: [PATCH] easy deploy --- .gitignore | 1 - push.sh | 17 +++++++++++++++++ www/index.html | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 push.sh diff --git a/.gitignore b/.gitignore index f36ac44..26dab64 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,4 @@ package-lock.json /www/package-lock.json /www/node_modules /www/dist -/push.sh /tmp \ No newline at end of file diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..6f24274 --- /dev/null +++ b/push.sh @@ -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 \ No newline at end of file diff --git a/www/index.html b/www/index.html index 3cbca60..209760c 100644 --- a/www/index.html +++ b/www/index.html @@ -8,7 +8,7 @@ - +

Integral Demonstration