summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-05-13 11:48:58 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-05-13 11:48:58 (EDT)
commita4c30696391676a53ae8b54aebcca51389546e79 (patch)
treedd714025c7d0b852147b95f1e8d5f5aaa12305dc /scripts
parentf23da27b4b3b80706f28609589c4a94ee7acffe0 (diff)
scripts/changelog2news.sh: New file.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/changelog2news.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/changelog2news.sh b/scripts/changelog2news.sh
new file mode 100755
index 0000000..a3c1d67
--- /dev/null
+++ b/scripts/changelog2news.sh
@@ -0,0 +1,17 @@
+#!/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/^\(.*\) (\(.*\))$/opkbuild version \1\n\n'
+script="${script}"'Released: \2\n\nChanges in this release:/'
+
+sed "${script}" "${1}" | \
+ sed -n '/^opkbuild /{p; s/./-/gp; n;}; /^opkbuild /!p' | \
+ grep -v '^ \['