hakurei.app/deploy_static
2019-04-28 02:40:36 -04:00

18 lines
303 B
Bash
Executable File

#!/bin/bash -x
set -o errexit
remote=www-data@grapheneos.org
current=$(ssh $remote readlink html)
if [[ $current = html_a ]]; then
target=html_b
else
target=html_a
fi
ssh $remote rm -rf $target
scp -r static $remote:$target
ssh $remote chmod -R a+rX $target
ssh $remote ln -snf $target html