From c5d0b3aef83d16fa6083407e2f67be5972e57be9 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 02 Mar 2014 14:47:52 -0500 Subject: scripts/changelog2news.sh: New file. --- diff --git a/Makefile.am b/Makefile.am index 68820f2..5ae8b1b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,7 +47,8 @@ EXTRA_DIST = \ $(locale_sources) \ $(archtab_sources) \ $(tests) \ - tests/testlib.sh + tests/testlib.sh \ + scripts/changelog2news.sh SUFFIXES = .sh .sm .1in .1 .ms 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 '^ \[' -- cgit v0.9.1