Add "export LC_ALL=C" to all shell scripts

This commit is contained in:
practicalswift 2018-06-13 16:50:48 +02:00
parent a607d23ae8
commit 3352da8da1
26 changed files with 34 additions and 1 deletions

View File

@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
set -e set -e
srcdir="$(dirname $0)" srcdir="$(dirname $0)"
cd "$srcdir" cd "$srcdir"

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
export LC_ALL=C
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
BUILDDIR=${BUILDDIR:-$TOPDIR} BUILDDIR=${BUILDDIR:-$TOPDIR}

View File

@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
# What to do # What to do
sign=false sign=false
verify=false verify=false

View File

@ -2,6 +2,7 @@
# Install libdb4.8 (Berkeley DB). # Install libdb4.8 (Berkeley DB).
export LC_ALL=C
set -e set -e
if [ -z "${1}" ]; then if [ -z "${1}" ]; then

View File

@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
set -e set -e
UNSIGNED="$1" UNSIGNED="$1"

View File

@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
set -e set -e
ROOTDIR=dist ROOTDIR=dist

View File

@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
set -e set -e
INPUTFILE="Xcode_7.3.1.dmg" INPUTFILE="Xcode_7.3.1.dmg"

View File

@ -2,6 +2,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
#network interface on which to limit traffic #network interface on which to limit traffic
IF="eth0" IF="eth0"
#limit of the network interface in question #limit of the network interface in question

View File

@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
INPUT=$(cat /dev/stdin) INPUT=$(cat /dev/stdin)
VALID=false VALID=false
REVSIG=false REVSIG=false

View File

@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
if ! [[ "$2" =~ ^(git@)?(www.)?github.com(:|/)bitcoin/bitcoin(.git)?$ ]]; then if ! [[ "$2" =~ ^(git@)?(www.)?github.com(:|/)bitcoin/bitcoin(.git)?$ ]]; then
exit 0 exit 0
fi fi

View File

@ -11,6 +11,7 @@
### The script returns 0 if everything passes the checks. It returns 1 if either the ### The script returns 0 if everything passes the checks. It returns 1 if either the
### signature check or the hash check doesn't pass. If an error occurs the return value is 2 ### signature check or the hash check doesn't pass. If an error occurs the return value is 2
export LC_ALL=C
function clean_up { function clean_up {
for file in $* for file in $*
do do

View File

@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
if [ -z "$OSSLSIGNCODE" ]; then if [ -z "$OSSLSIGNCODE" ]; then
OSSLSIGNCODE=osslsigncode OSSLSIGNCODE=osslsigncode
fi fi

View File

@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then
cd "$2" || exit 1 cd "$2" || exit 1
fi fi

View File

@ -2,6 +2,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
FRAMEDIR=$(dirname $0) FRAMEDIR=$(dirname $0)
for i in {0..35} for i in {0..35}
do do

View File

@ -11,6 +11,7 @@
# The resulting script should exactly transform the previous commit into the current # The resulting script should exactly transform the previous commit into the current
# one. Any remaining diff signals an error. # one. Any remaining diff signals an error.
export LC_ALL=C
if test "x$1" = "x"; then if test "x$1" = "x"; then
echo "Usage: $0 <commit>..." echo "Usage: $0 <commit>..."
exit 1 exit 1

View File

@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
DIR="$1" DIR="$1"
COMMIT="$2" COMMIT="$2"
if [ -z "$COMMIT" ]; then if [ -z "$COMMIT" ]; then

View File

@ -7,6 +7,10 @@
# This script runs all contrib/devtools/lint-*.sh files, and fails if any exit # This script runs all contrib/devtools/lint-*.sh files, and fails if any exit
# with a non-zero status code. # with a non-zero status code.
# This script is intentionally locale dependent by not setting "export LC_ALL=C"
# in order to allow for the executed lint scripts to opt in or opt out of locale
# dependence themselves.
set -u set -u
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}") SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")

View File

@ -6,6 +6,7 @@
# #
# Check include guards. # Check include guards.
export LC_ALL=C
HEADER_ID_PREFIX="BITCOIN_" HEADER_ID_PREFIX="BITCOIN_"
HEADER_ID_SUFFIX="_H" HEADER_ID_SUFFIX="_H"

View File

@ -8,6 +8,7 @@
# Guard against accidental introduction of new Boost dependencies. # Guard against accidental introduction of new Boost dependencies.
# Check includes: Check for duplicate includes. Enforce bracket syntax includes. # Check includes: Check for duplicate includes. Enforce bracket syntax includes.
export LC_ALL=C
IGNORE_REGEXP="/(leveldb|secp256k1|univalue)/" IGNORE_REGEXP="/(leveldb|secp256k1|univalue)/"
filter_suffix() { filter_suffix() {

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
export LC_ALL=C
KNOWN_VIOLATIONS=( KNOWN_VIOLATIONS=(
"src/base58.cpp:.*isspace" "src/base58.cpp:.*isspace"
"src/bitcoin-tx.cpp.*stoul" "src/bitcoin-tx.cpp.*stoul"

View File

@ -12,7 +12,7 @@
# There are some instances of LogPrintf() in comments. Those can be # There are some instances of LogPrintf() in comments. Those can be
# ignored # ignored
export LC_ALL=C
UNTERMINATED_LOGS=$(git grep --extended-regexp "LogPrintf?\(" -- "*.cpp" | \ UNTERMINATED_LOGS=$(git grep --extended-regexp "LogPrintf?\(" -- "*.cpp" | \
grep -v '\\n"' | \ grep -v '\\n"' | \
grep -v "/\* Continued \*/" | \ grep -v "/\* Continued \*/" | \

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
# Shebang must use python3 (not python or python2) # Shebang must use python3 (not python or python2)
export LC_ALL=C
EXIT_CODE=0 EXIT_CODE=0
for PYTHON_FILE in $(git ls-files -- "*.py"); do for PYTHON_FILE in $(git ls-files -- "*.py"); do
if [[ $(head -c 2 "${PYTHON_FILE}") == "#!" && if [[ $(head -c 2 "${PYTHON_FILE}") == "#!" &&

View File

@ -6,6 +6,8 @@
# #
# Check for specified flake8 warnings in python files. # Check for specified flake8 warnings in python files.
export LC_ALL=C
# E101 indentation contains mixed spaces and tabs # E101 indentation contains mixed spaces and tabs
# E112 expected an indented block # E112 expected an indented block
# E113 unexpected indentation # E113 unexpected indentation

View File

@ -6,6 +6,10 @@
# #
# Check for shellcheck warnings in shell scripts. # Check for shellcheck warnings in shell scripts.
# This script is intentionally locale dependent by not setting "export LC_ALL=C"
# to allow running certain versions of shellcheck that core dump when LC_ALL=C
# is set.
# Disabled warnings: # Disabled warnings:
# SC2001: See if you can use ${variable//search/replace} instead. # SC2001: See if you can use ${variable//search/replace} instead.
# SC2004: $/${} is unnecessary on arithmetic variables. # SC2004: $/${} is unnecessary on arithmetic variables.

View File

@ -6,6 +6,7 @@
# #
# Check the test suite naming conventions # Check the test suite naming conventions
export LC_ALL=C
EXIT_CODE=0 EXIT_CODE=0
NAMING_INCONSISTENCIES=$(git grep -E '^BOOST_FIXTURE_TEST_SUITE\(' -- \ NAMING_INCONSISTENCIES=$(git grep -E '^BOOST_FIXTURE_TEST_SUITE\(' -- \

View File

@ -8,6 +8,7 @@
# We can't run this check unless we know the commit range for the PR. # We can't run this check unless we know the commit range for the PR.
export LC_ALL=C
while getopts "?" opt; do while getopts "?" opt; do
case $opt in case $opt in
?) ?)