17 lines
295 B
Bash
Executable File
17 lines
295 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
|
|
|
|
rsync -rcve ssh --delete static/ $remote:$target
|
|
ssh $remote chmod -R a+rX $target
|
|
ssh $remote ln -snf $target html
|