Skip to contentSkip to conversation

dependencies.sh: suppress output of locale

PATCH Superseded Arnout Vandecappelle (Essensium/Mind) 2 participants 4 messages Jul 11, 2012 – Jul 14, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dependencies.sh: suppress output of locale

---
 support/dependencies/dependencies.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/dependencies/dependencies.sh +1 -1
index c47ffcf..590d1b5 100755
@@ -153,7 +153,7 @@ if grep ^BR2_TOOLCHAIN_BUILDROOT=y $CONFIG_FILE > /dev/null && \
        /bin/echo -e "\nYou need locale support on your build machine to build a toolchain supporting locales\n"
        exit 1 ;
    fi
-   if ! locale -a | grep -i utf8$ ; then
+   if ! locale -a | grep -i utf8$ > /dev/null; then
        /bin/echo -e "\nYou need at least one UTF8 locale to build a toolchain supporting locales\n"
        exit 1 ;
    fi
Signature · 1 line
tg: (b8b57bb..) t/dependencies-dont-print-locale (depends on: master)
#1 lore raw

PATCH 1/1 dependencies.sh: suppress output of locale

Le Wed, 11 Jul 2012 07:42:49 +0200,
"Arnout Vandecappelle (Essensium/Mind)" <[email protected]> a ?crit :

Quoted 1 line

+ if ! locale -a | grep -i utf8$ > /dev/null; then

What about grep -q ?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 dependencies.sh: suppress output of locale

---
v2: Use grep -q as suggested by ThomasP

 support/dependencies/dependencies.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/dependencies/dependencies.sh +1 -1
index c47ffcf..9f0f6a9 100755
@@ -153,7 +153,7 @@ if grep ^BR2_TOOLCHAIN_BUILDROOT=y $CONFIG_FILE > /dev/null && \
        /bin/echo -e "\nYou need locale support on your build machine to build a toolchain supporting locales\n"
        exit 1 ;
    fi
-   if ! locale -a | grep -i utf8$ ; then
+   if ! locale -a | grep -q -i utf8$ ; then
        /bin/echo -e "\nYou need at least one UTF8 locale to build a toolchain supporting locales\n"
        exit 1 ;
    fi
Signature · 1 line
tg: (b8b57bb..) t/dependencies-dont-print-locale (depends on: master)