shithub: rc

ref: 345449d42d68edc414adaf7c9888bb86d0efd2d8
dir: /repou/

View raw version
#!/bin/rc
# giturl\tname\tdir\tdesc
awk '
BEGIN{
	FS="\t"
}$1 !~ /^(#|$)/{
	print $2
	basedir = $3
	sub("/[^/]+$", "", basedir)
	# yikes
	if(system("test -d " $3) != 0){
		system("mkdir -p " basedir)
		system("git/clone " $1 " " $3)
	}else{
		system("rc -c \''cd " $3 "; git/pull\''")
	}
}
' $home/p/lib/^(plan9 unix)