summaryrefslogtreecommitdiff
path: root/deploy_static
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2019-04-25 17:58:53 -0400
committerDaniel Micay <danielmicay@gmail.com>2019-04-25 22:34:35 -0400
commit1f78b34072693e94eb4e5ae0db1e8d7bc60807b2 (patch)
tree0c4968e703d8da4ae6e8f3a4fbe4f5c4aed22252 /deploy_static
initial commit based on seamlessupdate.app
Diffstat (limited to 'deploy_static')
-rwxr-xr-xdeploy_static17
1 files changed, 17 insertions, 0 deletions
diff --git a/deploy_static b/deploy_static
new file mode 100755
index 00000000..03d29071
--- /dev/null
+++ b/deploy_static
@@ -0,0 +1,17 @@
+#!/bin/bash -x
+
+set -o errexit
+
+remote=root@grapheneos.org
+current=$(ssh $remote readlink /var/www/html)
+
+if [[ $current = html_a ]]; then
+ target=html_b
+else
+ target=html_a
+fi
+
+ssh $remote rm -rf /var/www/$target
+scp -r static $remote:/var/www/$target
+ssh $remote chmod -R a+rX /var/www/$target
+ssh $remote ln -snf $target /var/www/html