bash: add sanity check for locale in run-ptest
PATCH 1/1 bash: add sanity check for locale in run-ptest
We will fail later if the current locale is invalid, so check for error messages from locale.
Signed-off-by Joe Slater <[email protected]>
--- meta/recipes-extended/bash/bash/run-ptest | 7 +++++++ 1 file changed, 7 insertions(+)
meta/recipes-extended/bash/bash/run-ptest +7 -0
@@ -1,5 +1,12 @@ #!/bin/sh +if [ -n "`locale -V 2>&1 >/dev/null`" ] +then + echo "The default locale is not valid!" + echo "Try 'locale -a' to see installed locales." + exit 1 +fi + en_US=`locale -a | grep en_US*` fr_FR=`locale -a | grep fr_FR*` de_DE=`locale -a | grep de_DE*`
Signature · 1 line
2.7.4