summaryrefslogtreecommitdiff
path: root/rc/bin/patch/okay
diff options
context:
space:
mode:
Diffstat (limited to 'rc/bin/patch/okay')
-rwxr-xr-xrc/bin/patch/okay14
1 files changed, 14 insertions, 0 deletions
diff --git a/rc/bin/patch/okay b/rc/bin/patch/okay
new file mode 100755
index 000000000..df7813d50
--- /dev/null
+++ b/rc/bin/patch/okay
@@ -0,0 +1,14 @@
+#!/bin/rc
+
+rfork e
+if(! ~ $#* 1){
+ echo usage: patch/okay dir >[1=2]
+ exit usage
+}
+
+i=$1
+if(! test -s $i/files || ! test -s $i/readme)
+ exit 'missing files'
+if(grep -v '^/[_a-zA-Z0-9.\-+/:]+ [_a-zA-Z0-9.\-+:]+$' $i/files)
+ exit 'bad file list'
+exit 0