shithub: rc

Download patch

ref: d46a7940b90b29abe439587653cabb518c9050a4
parent: 7df951fac4c458d477ea9009991045d8106c2fb0
author: qwx <qwx@sciops.net>
date: Wed Jan 6 06:17:09 EST 2021

add repou: fetch and update alien software from lists

--- /dev/null
+++ b/repou
@@ -1,0 +1,18 @@
+#!/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)