* [PATCH 1/1] bash: add sanity check for locale in run-ptest
@ 2019-04-15 23:52 Joe Slater
0 siblings, 0 replies; only message in thread
From: Joe Slater @ 2019-04-15 23:52 UTC (permalink / raw)
To: openembedded-core
We will fail later if the current locale is invalid, so check
for error messages from locale.
Signed-off-by: Joe Slater <joe.slater@windriver.com>
---
meta/recipes-extended/bash/bash/run-ptest | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest
index c61fabd..19f2991 100644
--- a/meta/recipes-extended/bash/bash/run-ptest
+++ b/meta/recipes-extended/bash/bash/run-ptest
@@ -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*`
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-04-15 23:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-15 23:52 [PATCH 1/1] bash: add sanity check for locale in run-ptest Joe Slater
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.