diff options
author | rofl0r <retnyg@gmx.net> | 2016-10-02 19:59:23 +0100 |
---|---|---|
committer | rofl0r <retnyg@gmx.net> | 2016-10-02 20:03:09 +0100 |
commit | ba2b502a2987fd23861329a852b43eb5e97fcbe2 (patch) | |
tree | a7000e1a8ef9e19ffb8dca275318a8eded88f0ef | |
parent | d99bf44a8025a1b27dfae8b6a245883ba7f0bf4d (diff) | |
download | gettext-tiny-ba2b502a2987fd23861329a852b43eb5e97fcbe2.tar.gz |
xgettext: fix error when using -o /absolute/pathv0.0.5
if the outputfile is given, but no outputdir specified, we shall not
prefix the outputfilename with `./`.
experienced during the build of weechat 1.6.
-rwxr-xr-x | src/xgettext.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/xgettext.sh b/src/xgettext.sh index 3217355..42769a5 100755 --- a/src/xgettext.sh +++ b/src/xgettext.sh @@ -1,7 +1,7 @@ #!/bin/sh outputfile= -outputdir=. +outputdir= domain=messages spliteq() { @@ -103,10 +103,14 @@ while true ; do shift done -[ -z "$outputfile" ] && outputfile=${domain}.po [ "$outputfile" = "-" ] && exit 0 -if [ ! -z "$outputfile" ] ; then +if [ -z "$outputfile" ] ; then + outputfile=${domain}.po + [ -z "$outputdir" ] && outputdir=. touch $outputdir/$outputfile +else + [ -z "$outputdir" ] && touch $outputdir/$outputfile || \ + touch $outputfile fi |