You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
542 B
Bash

#! /bin/sh
# Fix < and > signs and replace bugnumbers in the file given
# (ChangeLog) with links to Redmine issues.
if [ $# -ne 1 ] ; then
echo Usage: buglinks.sh ChangeLog
exit 1
fi
file=$1
sed -e 's/\&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g' $file > $file.tmp
mv $file.tmp $file
sed -e 's,\#\([1-9][0-9][0-9]\),<a title="bug \1" href="http://dev.exiv2.org/issues/\1">#\1</a>,g; s,\([0-9][0-9][0-9][0-9][0-9][0-9][0-9]\),<a title="bug \1" href="http://dev.exiv2.org/issues/\1">\1</a>,g' $file > $file.tmp
mv $file.tmp $file