shithub: rc

ref: 4ceae83df9e48cf3a950365aaf6e31a49cf62cfe
dir: /bin/repou/

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