summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2014-03-02 14:47:52 (EST)
committer P. J. McDermott <pjm@nac.net>2014-03-02 14:47:52 (EST)
commitc5d0b3aef83d16fa6083407e2f67be5972e57be9 (patch)
tree680ec64f3be85b60f6ddbb5f863a14750a60f011 /scripts
parenta43a53fc7c9791fffd2012dc32eef5292988d218 (diff)
scripts/changelog2news.sh: New file.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/changelog2news.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/changelog2news.sh b/scripts/changelog2news.sh
new file mode 100755
index 0000000..2716de3
--- /dev/null
+++ b/scripts/changelog2news.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Script to convert old-style ChangeLog files into new-style NEWS files.
+#
+# Copyright (C) 2014 Patrick "P. J." McDermott
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+
+script='s/^\(.*\) (\(.*\))$/OPK Build Helper Tools version \1\n\n'
+script="${script}"'Released: \2\n\nChanges in this release:/'
+
+sed "${script}" "${1}" | sed -n '/^OPK /{p; s/./-/gp; n;}; /^OPK /!p' | \
+ grep -v '^ \['