summaryrefslogtreecommitdiff
path: root/patch/patch-orig/orig
diff options
context:
space:
mode:
Diffstat (limited to 'patch/patch-orig/orig')
-rwxr-xr-xpatch/patch-orig/orig16
1 files changed, 16 insertions, 0 deletions
diff --git a/patch/patch-orig/orig b/patch/patch-orig/orig
new file mode 100755
index 0000000..16db50d
--- /dev/null
+++ b/patch/patch-orig/orig
@@ -0,0 +1,16 @@
+#!/bin/rc -e
+
+p=`{cleanname -d `{pwd} $1}
+n=`{echo $p | sed 's,\.orig,,'}
+dir=`{basename -d $p}
+
+if(! test -d /n/sources/plan9){
+ rfork n
+ 9fs sources
+}
+
+if(test -e /n/sources/plan9$n)
+ echo /n/sources/plan9$n: replacing existing file >[1=2]
+mkdir -p /n/sources/plan9$dir
+echo cp $p /n/sources/plan9$n
+cp $p /n/sources/plan9$n