Commit 0058172e authored by bgm's avatar bgm
Browse files

INFRA-104: create-pot-files-extensions.sh: add POTDIR env var.

Allow to set the potdir using the POTDIR environment variable.
This makes it easier to pass a specific script argument, but not need
to pass the other arguments which can be auto-detected by this script
using the info.xml of the extension.
parent b70ff8f1
......@@ -5,7 +5,7 @@ function usage() {
create-pot-files-extensions.sh - builds .pot files for CiviCRM extensions.
Usage:
./bin/create-pot-files-extensions.sh [short name] [src dir] [dest dir]
./bin/create-pot-files-extensions.sh [short name] [src dir] [dest dir]
Example:
./bin/create-pot-files-extensions.sh
......@@ -47,7 +47,13 @@ if [ "$1" == "" ]; then
test "$extname" == "" && echo 'Error: could not find the file tag from info.xml' && usage
root="."
potdir="l10n/pot/"
# The automatic string extractor passes an environment variable to set the potdir.
if [ -d "$POTDIR" ]; then
potdir=$POTDIR
else
potdir="l10n/pot/"
fi
# At this point we can assume that we are in the right place, and can create
# the pot target directory if necessary.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment