aboutsummaryrefslogtreecommitdiff
path: root/pkgpatch
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-18 12:00:52 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-18 12:00:52 +0200
commit2af4ce763faae0c6f68b171b43e93101047d0c02 (patch)
treefafb211fa4f02a098d979fccf9512f8874373151 /pkgpatch
parent3522ec2858128e61488249dcb1e130814c8b79fd (diff)
downloadpatches-2af4ce763faae0c6f68b171b43e93101047d0c02.tar.gz
Add pkgpatch script, remove pkgdiff patches
Diffstat (limited to 'pkgpatch')
-rwxr-xr-xpkgpatch13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgpatch b/pkgpatch
new file mode 100755
index 0000000..8d68c20
--- /dev/null
+++ b/pkgpatch
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# pkgpatch -- patch but don't overwrite original files
+
+for orig in *.orig; do
+ mv -i "$orig" "${orig%.orig}".~1~
+done
+
+patch -Vt -F3 "$@"
+
+for orig in *.~1~; do
+ mv -i "$orig" "${orig%.~1~}".orig
+done