27 lines · 423 B · Text
RawDownload
#!/bin/rc if(! ~ $#* 1){	echo 'usage: $patch/undo patch-name' >[1=2]	exit usage}. /rc/bin/apatch/defsmountfs test -e /n/dist/386 || bind / /n/dist || fail no dist d=/n/dist/dist/$patch/$1must cd $d fn xxx {	if(test -e $2.backup){		echo cp $2.backup $1 >[1=2]		cpfile $2.backup /n/dist$1	}	if not{		echo rm -rf /n/dist$1		rm -rf /n/dist$1	}} cat files | sed 's/^/xxx /' |rcrm -rf /n/dist/dist/$patch/$1