Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/rc/pull

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


#!/bin/rc

rfork en

9fs boot
9fs sources

y=`{date | awk '{print $NF}'}
chg=/n/sources/extra/changes/$y
db=/n/boot/dist/replica/client/plan9.db

fn pretty {
	awk '
	$1 ~ "^[\[].*[\]]$" && NF == 11{
		who=$1;
		gsub("^[\[]", "", who);
		gsub("[\]]$", "", who);
		if ($0 ~ "^ .*")
			printf("	%-8s %s %-2s %s /%s\n", who, $8, $9, $10, $11);
		else
			printf("%-8s %s %-2s %s %s\n", who, $8, $9, $10, $11);
		next;
	}
	{
		printf("	%s\n", $0);
	}
	'
}

ls -tlrm $chg/* $db |
	sed '1,/plan9.db$/d' |
	while(f=`{read}){
		echo $f | pretty
		grep -v '^	' $f(11) | pretty
	}

flags=()
while(! ~ $#* 0 && ~ $1 -*){
	if(~ $1 -c -s){
		flags=($flags $1)
		shift
	}
	flags=($flags $1)
	shift
}

replica/pull -v $flags /dist/replica/network $*

rm -f /srv/sources

yesterday -D /sys/games/lib/fortunes | sed -n 's/^> //p'

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.