build: do not run ./build/mkbasepot.sh twice

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald
2026-02-03 07:22:04 +01:00
parent c0d67c88dc
commit 523f2bda5f

View File

@@ -12,6 +12,14 @@ print_help() {
exit 1
}
RAN_MKBASE=0
if [ "$#" -eq 0 ]; then
NOARGS=1
else
NOARGS=0
fi
case $1 in
-h | --help )
print_help
@@ -19,13 +27,16 @@ case $1 in
;;
-b )
./build/mkbasepot.sh
RAN_MKBASE=1
shift
;;
esac
[ -n "$1" ] && set -- "${1%/}"
[ -n "$1" ] || ./build/mkbasepot.sh
if [ "$NOARGS" -eq 1 ] && [ "$RAN_MKBASE" -eq 0 ]; then
./build/mkbasepot.sh
fi
# Absent a [folder] parameter, use the current path
find "${1:-.}" -name '*.pot' -and -not -name base.pot | sort | \