Kaydet (Commit) 125f06db authored tarafından Tomofumi Yagi's avatar Tomofumi Yagi Kaydeden (comit) Michael Stahl

'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/16344Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst fe9da154
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment