# HG changeset patch # User Matti Hamalainen # Date 1589967761 -10800 # Node ID 627a2524520d27c3621d401cdd5f00e5082cfdf2 # Parent 0accb32904e7b818153cf826316988291967d4b9 Cleanups, rename svn2cl.xsl to xml2cl.csl. diff -r 0accb32904e7 -r 627a2524520d hg2cl --- a/hg2cl Wed May 20 10:44:27 2020 +0300 +++ b/hg2cl Wed May 20 12:42:41 2020 +0300 @@ -45,7 +45,7 @@ CHANGELOG="ChangeLog" # do command line checking -prog=`basename $0` +prog="$(basename $0)" while [ -n "$1" ] do case "$1" in @@ -78,7 +78,7 @@ shift ;; -V|--version) - echo "$prog $VERSION"; + echo "${prog} $VERSION"; echo "Written by Arthur de Jong." echo "Modified for Mercurial by Matti Hamalainen." echo "Copyright (C) 2005 Arthur de Jong." @@ -89,7 +89,7 @@ exit 0 ;; -h|--help) - echo "Usage: $prog [OPTION]..." + echo "Usage: ${prog} [OPTION]..." echo "Generate a ChangeLog from a checked out Mercurial repository." echo "" echo " --strip-prefix NAME prefix to strip from all entries, defaults" @@ -105,8 +105,8 @@ exit 0 ;; *) - echo "$prog: invalid option -- $1" - echo "Try \`$prog --help' for more information." + echo "${prog}: invalid option -- $1" + echo "Try \`${prog} --help' for more information." exit 1 ;; esac @@ -120,7 +120,7 @@ # find the directory that this script resides in dir="$(dirname "$(realpath "$0")")" -XSL="${dir}/svn2cl.xsl" +XSL="${dir}/xml2cl.xsl" # redirect stdout to the changelog file if needed if test "x$CHANGELOG" != "x-"; then diff -r 0accb32904e7 -r 627a2524520d svn2cl --- a/svn2cl Wed May 20 10:44:27 2020 +0300 +++ b/svn2cl Wed May 20 12:42:41 2020 +0300 @@ -44,7 +44,7 @@ CHANGELOG="ChangeLog" # do command line checking -prog=`basename $0` +prog="$(basename $0)" while [ -n "$1" ] do case "$1" in @@ -77,7 +77,7 @@ shift ;; -V|--version) - echo "$prog $VERSION"; + echo "${prog} $VERSION"; echo "Written by Arthur de Jong." echo "Modified by Matti Hamalainen." echo "Copyright (C) 2005-2008 Arthur de Jong." @@ -87,7 +87,7 @@ exit 0 ;; -h|--help) - echo "Usage: $prog [OPTION]..." + echo "Usage: ${prog} [OPTION]..." echo "Generate a ChangeLog from a checked out subversion repository." echo "" echo " --strip-prefix NAME prefix to strip from all entries, defaults" @@ -103,8 +103,8 @@ exit 0 ;; *) - echo "$prog: invalid option -- $1" - echo "Try \`$prog --help' for more information." + echo "${prog}: invalid option -- $1" + echo "Try \`${prog} --help' for more information." exit 1 ;; esac @@ -117,13 +117,8 @@ fi # find the directory that this script resides in -prog="$0" -while test -h "$prog"; do - prog=`ls -ld "$prog" | sed "s/^.*-> \(.*\)/\1/;/^[^/]/s,^,$(dirname "$prog")/,"` -done -dir=`dirname $prog` -dir=`cd $dir && pwd` -XSL="$dir/svn2cl.xsl" +dir="$(dirname "$(realpath "$0")")" +XSL="${dir}/xml2cl.xsl" # redirect stdout to the changelog file if needed if test "x$CHANGELOG" != "x-"; then diff -r 0accb32904e7 -r 627a2524520d svn2cl.xsl --- a/svn2cl.xsl Wed May 20 10:44:27 2020 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,295 +0,0 @@ - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - &newl; - - - - - - - - - - - - - - - - - - - - - - - - - - - &newl; - - - - - &space;&space; - - - - &newl;&newl; - - - - - - - - - [r - - ]&space; - - - - &tab;*&space; - - - - - - - - - - - - - - &space; - - - - - - - - - - - - - - - - ,&space; - - - - - - :&space; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - . - - - - - - - - - - - - - - - - &newl; - - - - - - - - - - - - - - - - - - - &newl;&tab;&space;&space; - - - - - - - - - - - - - - - - - - - - - - - - diff -r 0accb32904e7 -r 627a2524520d xml2cl.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml2cl.xsl Wed May 20 12:42:41 2020 +0300 @@ -0,0 +1,295 @@ + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + &newl; + + + + + + + + + + + + + + + + + + + + + + + + + + + &newl; + + + + + &space;&space; + + + + &newl;&newl; + + + + + + + + + [r + + ]&space; + + + + &tab;*&space; + + + + + + + + + + + + + + &space; + + + + + + + + + + + + + + + + ,&space; + + + + + + :&space; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + &newl; + + + + + + + + + + + + + + + + + + + &newl;&tab;&space;&space; + + + + + + + + + + + + + + + + + + + + + + + +