Skip to content
Snippets Groups Projects

syncriscv: add role for mirroring the RISC-V port

Merged Evangelos Foutras requested to merge riscv-mirror into master
@@ -3,7 +3,7 @@
target="/srv/riscv"
lock="/var/lock/syncriscv.lck"
source_url='rsync://archriscv.felixc.at/archriscv'
lastupdate_url='https://archriscv.felixc.at/'
lastupdate_url='https://archriscv.felixc.at/.status/lastupdate.txt'
[ ! -d "${target}" ] && mkdir -p "${target}"
@@ -24,7 +24,7 @@ rsync_cmd() {
}
# if we are called without a tty (cronjob) only run when there are changes
if ! tty -s && [[ -f "$target/index.html" ]] && diff -b <(curl -Ls "$lastupdate_url") "$target/lastupdate" >/dev/null; then
if ! tty -s && [[ -f "$target/.status/lastupdate.txt" ]] && diff -b <(curl -Ls "$lastupdate_url") "$target/.status/lastupdate.txt" >/dev/null; then
exit 0
fi
Loading