shithub: gitonline

ref: 61817eaa5b42e29b9db7fdc42026d02621c1168b
dir: /mirror.rc/

View raw version
#!/bin/rc

webfs
cd /usr/glenda/src/repodir

repos=`{hget http://shithub.us/git/repos.html | grep '<dt><a href=' | sed 's,.*">(.*)</a></dt>,\1,g'}

for (repo in $repos) {
	date=`{date}
	if (test -d $repo) {
		echo pull $repo at $"date >> /sys/log/shithubmirror
		cd $repo
		git/pull
		cd ../../
	}
	if not {
		echo clone $repo at $"date >> /sys/log/shithubmirror
		git/clone git://shithub.us/$repo $repo
	}
}
echo Mirroring done