shithub: gitonline

Download patch

ref: 14eff369ce49e1a4d0e8f12bc8861f6e26b59abc
parent: 61817eaa5b42e29b9db7fdc42026d02621c1168b
author: glenda <glenda@9front.local>
date: Mon Nov 30 06:38:06 EST 2020

Just reclone if the pull goes wrong

--- a/mirror.rc
+++ b/mirror.rc
@@ -10,11 +10,18 @@
 	if (test -d $repo) {
 		echo pull $repo at $"date >> /sys/log/shithubmirror
 		cd $repo
-		git/pull
-		cd ../../
+		if(git/pull) {
+			cd ../../
+		}
+		if not {
+			cd ../../
+			rm -rf $repo
+			echo re-clone $repo at $"date >> /sys/log/shithubmirror
+			git/clone git://shithub.us/$repo $repo
+		}
 	}
 	if not {
-		echo clone $repo at $"date >> /sys/log/shithubmirror
+		echo re-clone $repo at $"date >> /sys/log/shithubmirror
 		git/clone git://shithub.us/$repo $repo
 	}
 }