summaryrefslogtreecommitdiff
path: root/g
diff options
context:
space:
mode:
authorTomofumi Yagi <yagit@mknada.sakura.ne.jp>2015-06-15 21:20:19 +0900
committerMichael Stahl <mstahl@redhat.com>2015-06-18 11:19:23 +0000
commit125f06dbf73c287c3559acbb3096330b5e75135b (patch)
treeb9c6f769b0dabbda906fa1135d27e41b3c1a98bf /g
parentfe9da15401574551c34fffbd4e63eddca9743527 (diff)
'g' doesn't work correctly when config_host.mk contains non-ascii characters.
In 'g' shell script, we use grep to get substring from config_host.mk file. When config_host.mk file contains non-ascii characters(e.g. Japanese), this processing doesn't work. As a result, some variables(SUBMODULES_CONFIGURED, REFERENCED_GIT, LINKED_GIT) will be assigned to "Binary file (standard input) matches". This is an error message of grep. The problem will reproduce on Cygwin64 with Japanese locale. With '-a' option, grep will work well, and 'g' shell script will work correctly. Please refer the following commit,too. http://cgit.freedesktop.org/libreoffice/core/commit/?id=0293ec98c92fd58a592f7dd86fbbf47e7b9195c6 Change-Id: If4e0b356173c8f442e3539ed343f441d87dbfd48 Reviewed-on: https://gerrit.libreoffice.org/16344 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'g')
-rwxr-xr-xg6
1 files changed, 3 insertions, 3 deletions
diff --git a/g b/g
index 2db87cf60170..423a200231e9 100755
--- a/g
+++ b/g
@@ -147,7 +147,7 @@ get_configured_submodules()
{
SUBMODULES_CONFIGURED=""
if [ -f config_host.mk ] ; then
- SUBMODULES_CONFIGURED=$(cat config_host.mk | grep GIT_NEEDED_SUBMODULES | sed -e "s/.*=//")
+ SUBMODULES_CONFIGURED=$(cat config_host.mk | grep -a GIT_NEEDED_SUBMODULES | sed -e "s/.*=//")
else
# if we need the configured submoduel before the configuration is done. we assumed you want them all
SUBMODULES_CONFIGURED=${SUBMODULES_ALL?}
@@ -158,11 +158,11 @@ get_git_reference()
{
REFERENCED_GIT=""
if [ -f config_host.mk ]; then
- REFERENCED_GIT=$(cat config_host.mk | grep GIT_REFERENCE_SRC | sed -e "s/.*=//")
+ REFERENCED_GIT=$(cat config_host.mk | grep -a GIT_REFERENCE_SRC | sed -e "s/.*=//")
fi
LINKED_GIT=""
if [ -f config_host.mk ]; then
- LINKED_GIT=$(cat config_host.mk | grep GIT_LINK_SRC | sed -e "s/.*=//")
+ LINKED_GIT=$(cat config_host.mk | grep -a GIT_LINK_SRC | sed -e "s/.*=//")
fi
}