Plan 9 from Bell Labs’s /usr/web/sources/contrib/rminnich/package/bin/rc/local

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

rfork e

repldir=/dist/replica
filt=cat
fn usage {
	echo 'usage: contrib/local [-c] [-p]' >[1=2]
	exit  usage	
}

fn pfilt {
	if(~ $repldir /dist/replica)
		awk '{print "contrib/pull " $1}'
	if not
		awk '{print "contrib/push " $1}'
}

while (! ~ $#* 0 && ~ $1 -*) {
	switch ($1) {
	case -c
		repldir=$home/lib/replica/cfg
	case -p
		filt=pfilt
	case -*
		usage
	}
	shift
}
if(! ~ $#* 0)
	usage
@{
	cd $repldir
	ls | grep -v '^(cd|client|didplan9|kfs|network|plan9|plan9\.proto)$'|$filt
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.