xref: /plan9/rc/bin/patch/remove (revision 58da3067adcdccaaa043d0bfde28ba83b7ced07d)
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