aboutsummaryrefslogtreecommitdiff
path: root/sum
diff options
context:
space:
mode:
Diffstat (limited to 'sum')
-rwxr-xr-xsum14
1 files changed, 14 insertions, 0 deletions
diff --git a/sum b/sum
new file mode 100755
index 0000000..d6749a1
--- /dev/null
+++ b/sum
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# checksum -- create checksum for local patch
+
+[ -z "$1" ] && { echo usage: $0 patch 1>&2; exit 1; }
+
+localpath=`readlink -f "$1"`
+globalpath=/usr/pkgsrc/${localpath#/home/john/patches/}
+
+[ -e "$globalpath" ] && { echo error: "$globalpath" exists 1>&2; exit 1; }
+doas cp "$localpath" "$globalpath"
+cd "$(dirname "$globalpath")"
+doas make makepatchsum
+doas rm "$globalpath"