Add updater
This commit is contained in:
parent
7f90eef911
commit
961226000a
27
updater
Executable file
27
updater
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/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
|
Loading…
Reference in a new issue