28 lines
492 B
Text
28 lines
492 B
Text
|
#!/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
|