From 51b5b02f52cc6f314029f3f2fe97afdc26ba0f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 28 Jan 2021 21:33:30 +0000 Subject: Add various patches --- patch/patch-orig/email | 1 + patch/patch-orig/files | 1 + patch/patch-orig/notes | 0 patch/patch-orig/orig | 16 ++++++++++++++++ patch/patch-orig/readme | 9 +++++++++ 5 files changed, 27 insertions(+) create mode 100644 patch/patch-orig/email create mode 100644 patch/patch-orig/files create mode 100644 patch/patch-orig/notes create mode 100755 patch/patch-orig/orig create mode 100644 patch/patch-orig/readme (limited to 'patch/patch-orig') diff --git a/patch/patch-orig/email b/patch/patch-orig/email new file mode 100644 index 0000000..191feb6 --- /dev/null +++ b/patch/patch-orig/email @@ -0,0 +1 @@ +john@ankarstrom.se diff --git a/patch/patch-orig/files b/patch/patch-orig/files new file mode 100644 index 0000000..6446d4d --- /dev/null +++ b/patch/patch-orig/files @@ -0,0 +1 @@ +/rc/bin/patch/orig orig diff --git a/patch/patch-orig/notes b/patch/patch-orig/notes new file mode 100644 index 0000000..e69de29 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 diff --git a/patch/patch-orig/readme b/patch/patch-orig/readme new file mode 100644 index 0000000..01e70ea --- /dev/null +++ b/patch/patch-orig/readme @@ -0,0 +1,9 @@ +patch/orig copies a file to /n/sources/plan9 + +It may not always be desirable to have an entire +source tree in /n/sources/plan9. +For simple patch work, it is sufficient to copy +the original file to /n/sources/plan9. +This is what patch/orig does. + +(It also ignores .orig in the given path.) -- cgit v1.2.3