build: invoke ./build/mkbasepot.sh with -b
authorPaul Donald <newtwen@gmail.com>
Thu, 15 Feb 2024 00:24:11 +0000 (01:24 +0100)
committerPaul Donald <newtwen@gmail.com>
Thu, 15 Feb 2024 00:26:22 +0000 (01:26 +0100)
Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 50f470f6be08a989f1a92094769a1db671862cf3)

build/i18n-sync.sh

index 6d36ca4f0dd214f9d17879f5ffdae66b9b7bca8e..d8460fc2b861e89926b9c758d6536d3c734d14fb 100755 (executable)
@@ -1,8 +1,10 @@
 #!/bin/sh
 
 print_help() { 
-       echo "Execute as ./build/i18n-sync.sh" >&2
-       echo "Or run as: ./build/i18n-sync.sh [module folder e.g. applications/luci-app-example]" >&2
+       echo "Execute as ./build/i18n-sync.sh [-b]" >&2
+       echo "Or run as: ./build/i18n-sync.sh [-b] [module folder e.g. applications/luci-app-example]" >&2
+       echo "Options:"
+       echo "  -b: Generate the base .pot file ( invokes ./build/mkbasepot.sh )"
 }
 
 [ -d ./build ] || {
@@ -15,11 +17,14 @@ case $1 in
                print_help
                exit 0
                ;;
+       -b )
+               ./build/mkbasepot.sh
+               shift
+               ;;
 esac
 
 [ -n "$1" ] && set -- "${1%/}"
 
-[ -n "$1" ] || ./build/mkbasepot.sh
 
 # Absent a [folder] parameter, use the current path
 find "${1:-.}" -name '*.pot' -and -not -name base.pot | sort | \