xref: /plan9/rc/bin/patch/remove (revision 25f7656a92d4745f0ae4bb0ac3376f038ab1f088)
1#!/bin/rc
2
3rfork e
4if(~ $#* 0){
5	echo 'usage: patch/remove patch-name...' >[1=2]
6	exit usage
7}
8
9if(! test -d /n/sources/patch){
10	rfork n
11	9fs sources
12}
13
14for(i){
15	if(! test -d /n/sources/patch/$i)
16		echo 'no such patch' /n/sources/patch/$i >[1=2]
17	if not
18		rm -rf /n/sources/patch/$i
19}
20