diff options
author | rofl0r <retnyg@gmx.net> | 2013-06-30 06:22:46 +0200 |
---|---|---|
committer | rofl0r <retnyg@gmx.net> | 2013-06-30 06:22:49 +0200 |
commit | 9deb9f9a5d0d0236dc2586d3727725591e77fd4c (patch) | |
tree | 16a62354dc5c17bcda161e782e5deb733b1abf42 | |
parent | 5f3f9b3dbc4a41daba0eb310eb02f1d3062749f6 (diff) | |
download | gettext-tiny-9deb9f9a5d0d0236dc2586d3727725591e77fd4c.tar.gz |
xgettext: fix bugv0.0.3
calling the parsearg function caused the next argument not to
be taken from the stack. thus any argument not starting with
- would cause the processing of the args to stop.
this statement uncovered the bug:
xgettext -s --no-wrap -f app.fil --output=locale/messages.pot
-rwxr-xr-x | src/xgettext.sh | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/xgettext.sh b/src/xgettext.sh index 20d3e86..3217355 100755 --- a/src/xgettext.sh +++ b/src/xgettext.sh @@ -21,7 +21,7 @@ show_version() { exit 0 } -parsearg() { +while true ; do case $1 in #--files-from=*) readfile `spliteq "$1"`;; #-f) expectfilefrom=1;; @@ -98,20 +98,14 @@ parsearg() { -M*) : ;; --help) syntax ;; -h) syntax ;; - *) syntax ;; - esac -} - -while true ; do - case $1 in - -*) parsearg "$1" ; shift ;; *) break ;; esac + shift done [ -z "$outputfile" ] && outputfile=${domain}.po [ "$outputfile" = "-" ] && exit 0 -if [ "$force" = "1" ] ; then +if [ ! -z "$outputfile" ] ; then touch $outputdir/$outputfile fi |