Mercurial > hg > buildtools
comparison hg2cl @ 20:627a2524520d
Cleanups, rename svn2cl.xsl to xml2cl.csl.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 20 May 2020 12:42:41 +0300 |
parents | 0accb32904e7 |
children | 31f6639b7a77 |
comparison
equal
deleted
inserted
replaced
19:0accb32904e7 | 20:627a2524520d |
---|---|
43 GROUPBYDAY="yes" | 43 GROUPBYDAY="yes" |
44 INCLUDEREV="no" | 44 INCLUDEREV="no" |
45 CHANGELOG="ChangeLog" | 45 CHANGELOG="ChangeLog" |
46 | 46 |
47 # do command line checking | 47 # do command line checking |
48 prog=`basename $0` | 48 prog="$(basename $0)" |
49 while [ -n "$1" ] | 49 while [ -n "$1" ] |
50 do | 50 do |
51 case "$1" in | 51 case "$1" in |
52 --strip-prefix) | 52 --strip-prefix) |
53 STRIPPREFIX="$2" | 53 STRIPPREFIX="$2" |
76 --stdout) | 76 --stdout) |
77 CHANGELOG="-" | 77 CHANGELOG="-" |
78 shift | 78 shift |
79 ;; | 79 ;; |
80 -V|--version) | 80 -V|--version) |
81 echo "$prog $VERSION"; | 81 echo "${prog} $VERSION"; |
82 echo "Written by Arthur de Jong." | 82 echo "Written by Arthur de Jong." |
83 echo "Modified for Mercurial by Matti Hamalainen." | 83 echo "Modified for Mercurial by Matti Hamalainen." |
84 echo "Copyright (C) 2005 Arthur de Jong." | 84 echo "Copyright (C) 2005 Arthur de Jong." |
85 echo "Copyright (C) 2008-2011 Matti Hamalainen <ccr@tnsp.org>." | 85 echo "Copyright (C) 2008-2011 Matti Hamalainen <ccr@tnsp.org>." |
86 echo "" | 86 echo "" |
87 echo "This is free software; see the source for copying conditions. There is NO" | 87 echo "This is free software; see the source for copying conditions. There is NO" |
88 echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | 88 echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
89 exit 0 | 89 exit 0 |
90 ;; | 90 ;; |
91 -h|--help) | 91 -h|--help) |
92 echo "Usage: $prog [OPTION]..." | 92 echo "Usage: ${prog} [OPTION]..." |
93 echo "Generate a ChangeLog from a checked out Mercurial repository." | 93 echo "Generate a ChangeLog from a checked out Mercurial repository." |
94 echo "" | 94 echo "" |
95 echo " --strip-prefix NAME prefix to strip from all entries, defaults" | 95 echo " --strip-prefix NAME prefix to strip from all entries, defaults" |
96 echo " to the name of the current directory" | 96 echo " to the name of the current directory" |
97 echo " --linelen NUM maximum length of an output line" | 97 echo " --linelen NUM maximum length of an output line" |
103 echo " -h, --help display this help and exit" | 103 echo " -h, --help display this help and exit" |
104 echo " -V, --version output version information and exit" | 104 echo " -V, --version output version information and exit" |
105 exit 0 | 105 exit 0 |
106 ;; | 106 ;; |
107 *) | 107 *) |
108 echo "$prog: invalid option -- $1" | 108 echo "${prog}: invalid option -- $1" |
109 echo "Try \`$prog --help' for more information." | 109 echo "Try \`${prog} --help' for more information." |
110 exit 1 | 110 exit 1 |
111 ;; | 111 ;; |
112 esac | 112 esac |
113 done | 113 done |
114 | 114 |
118 exit 2 | 118 exit 2 |
119 fi | 119 fi |
120 | 120 |
121 # find the directory that this script resides in | 121 # find the directory that this script resides in |
122 dir="$(dirname "$(realpath "$0")")" | 122 dir="$(dirname "$(realpath "$0")")" |
123 XSL="${dir}/svn2cl.xsl" | 123 XSL="${dir}/xml2cl.xsl" |
124 | 124 |
125 # redirect stdout to the changelog file if needed | 125 # redirect stdout to the changelog file if needed |
126 if test "x$CHANGELOG" != "x-"; then | 126 if test "x$CHANGELOG" != "x-"; then |
127 exec > "$CHANGELOG" | 127 exec > "$CHANGELOG" |
128 fi | 128 fi |