ref: a5d881764e2f96d0fba934a023e0565282a5af9a
dir: /bin/repoadd/
#!/bin/rc -e rfork ne fn usage{ echo usage: $0 '[-u user] REPO [DESC..]' >[1=2] exit usage } root=/sys/lib/extra repodir=usr user=() while(~ $1 -?){ switch($1){ case -u user=$2 shift 2 case * usage } } if(~ $#* 0) usage repo=(`{echo $1 | sed 's,.*/([^/]+)/([^/]+)/?$,\1 \2,'}) url=$1 shift if(~ $#user 0) user=$repo(1) repo=$repo(2) dir=$root/$repodir/$user git/clone $url $dir/$repo echo $url^' '^$user/^$repo^' '^$dir/$repo^' '^$"*