aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/patchversion9
-rw-r--r--bin/predist6
-rw-r--r--bin/snapshot10
3 files changed, 25 insertions, 0 deletions
diff --git a/bin/patchversion b/bin/patchversion
new file mode 100644
index 0000000..1976db4
--- /dev/null
+++ b/bin/patchversion
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# cat <<EOF | cat
+cat <<EOF | ed -s configure.ac
+,s/PDP_VERSION=.*/PDP_VERSION=$1/
+,wq
+EOF
+
+
diff --git a/bin/predist b/bin/predist
new file mode 100644
index 0000000..dfe6446
--- /dev/null
+++ b/bin/predist
@@ -0,0 +1,6 @@
+
+# patch version if environment variable is set
+[ -z $PDP_DIST_VERSION ] || sh bin/patchversion $PDP_DIST_VERSION
+
+# run autoconf with (patched) configure.ac
+sh bootstrap
diff --git a/bin/snapshot b/bin/snapshot
new file mode 100644
index 0000000..ea93e51
--- /dev/null
+++ b/bin/snapshot
@@ -0,0 +1,10 @@
+[ "$1" == "-d" ] && shift && APPEND="-`date +%Y%m%d_%H%M%S`"
+[ -z "$1" ] && echo "usage $0 [-d] <name>" && exit 1
+
+VER="$1$APPEND"
+
+# for autoconf patch in bin/predist
+export PDP_DIST_VERSION=$VER
+
+# create archive
+exec darcs dist -d "pdp-$VER"