summaryrefslogtreecommitdiff
path: root/patch/patch-orig/orig
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-01-28 21:33:30 +0000
committerJohn Ankarström <john@ankarstrom.se>2021-01-28 21:33:30 +0000
commit51b5b02f52cc6f314029f3f2fe97afdc26ba0f25 (patch)
tree711d1efadeb78ad9b2d9f7b629350358838bc626 /patch/patch-orig/orig
parentf3fd330cddade1c66d0f101d5cc6f657c4cd1bb6 (diff)
downloadplan9-51b5b02f52cc6f314029f3f2fe97afdc26ba0f25.tar.gz
Add various patches
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