diff options
author | Dominik Holland <dominik.holland@qt.io> | 2021-08-26 15:47:25 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2021-08-26 15:57:15 +0200 |
commit | be835366129620aa960c4756f6930e6111ae8e34 (patch) | |
tree | 95cdbf02c1deb9fbc4ddd2edfa959748a793fde0 | |
parent | aea2eb052dbe75ff5f20c2599d7e01add253ccd7 (diff) | |
download | qtapplicationmanager-be835366129620aa960c4756f6930e6111ae8e34.tar.gz |
Fix create-test-packages.sh to work without locale binary
Inside a yocto ptest build the locale binary is not available.
Change-Id: I7c6ab124d05ba768133405ba0d5e22399f55b4ec
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rwxr-xr-x | tests/data/create-test-packages.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/data/create-test-packages.sh b/tests/data/create-test-packages.sh index e17e3a9b..a832d78f 100755 --- a/tests/data/create-test-packages.sh +++ b/tests/data/create-test-packages.sh @@ -45,7 +45,11 @@ isMac=0 [ "$LC_ALL" = "C" ] && { echo "WARNING: unsetting \$LC_ALL, since it is set to \"C\" (most likely by a wrapper script or QtCreator)"; unset LC_ALL; } # let the c-library resolve all the indirect settings -eval "x$(locale | grep LC_CTYPE= | head -n1)" +if ! command -v locale &> /dev/null; then + xLC_CTYPE="${LC_CTYPE:-${LC_ALL:-${LANG}}}" # no locale command available +else + eval "x$(locale | grep LC_CTYPE= | head -n1)" +fi # now check for character encoding case "${xLC_CTYPE}" in |