go-webring/updater
2023-12-04 14:23:24 +00:00

28 lines
492 B
Fish
Executable file

#!/usr/bin/fish
cd (dirname (status -f))
set TMPOUT /tmp/go-webring-updater-git-output
set -l old_hash (git rev-parse HEAD)
while true
git pull 2>&1 1>$TMPOUT
or begin
sleep 60
continue
end
set new_hash (git rev-parse HEAD)
if test $old_hash != $new_hash
set old_hash $new_hash
cat $TMPOUT
make
and begin
dinitctl stop webring
dinitctl reload webring
dinitctl start webring
end
end
sleep 60
end