Skip to content

Commit

Permalink
Add "export LC_ALL=C" to all shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift authored and Bushstar committed Jun 20, 2018
1 parent 6705881 commit 88c0a30
Show file tree
Hide file tree
Showing 26 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions autogen.sh
Expand Up @@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
set -e
srcdir="$(dirname $0)"
cd "$srcdir"
Expand Down
1 change: 1 addition & 0 deletions contrib/devtools/gen-manpages.sh
@@ -1,5 +1,6 @@
#!/bin/bash

export LC_ALL=C
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
BUILDDIR=${BUILDDIR:-$TOPDIR}

Expand Down
1 change: 1 addition & 0 deletions contrib/gitian-build.sh
Expand Up @@ -2,6 +2,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
# What to do
sign=false
verify=false
Expand Down
1 change: 1 addition & 0 deletions contrib/install_db4.sh
Expand Up @@ -2,6 +2,7 @@

# Install libdb4.8 (Berkeley DB).

export LC_ALL=C
set -e

if [ -z "${1}" ]; then
Expand Down
1 change: 1 addition & 0 deletions contrib/macdeploy/detached-sig-apply.sh
Expand Up @@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
set -e

UNSIGNED="$1"
Expand Down
1 change: 1 addition & 0 deletions contrib/macdeploy/detached-sig-create.sh
Expand Up @@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
set -e

ROOTDIR=dist
Expand Down
1 change: 1 addition & 0 deletions contrib/macdeploy/extract-osx-sdk.sh
Expand Up @@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
set -e

INPUTFILE="Xcode_7.3.1.dmg"
Expand Down
1 change: 1 addition & 0 deletions contrib/qos/tc.sh
Expand Up @@ -2,6 +2,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
#network interface on which to limit traffic
IF="eth0"
#limit of the network interface in question
Expand Down
1 change: 1 addition & 0 deletions contrib/verify-commits/gpg.sh
Expand Up @@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
INPUT=$(cat /dev/stdin)
VALID=false
REVSIG=false
Expand Down
1 change: 1 addition & 0 deletions contrib/verify-commits/pre-push-hook.sh
Expand Up @@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# 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
exit 0
fi
Expand Down
1 change: 1 addition & 0 deletions contrib/verifybinaries/verify.sh
Expand Up @@ -11,6 +11,7 @@
### 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

export LC_ALL=C
function clean_up {
for file in $*
do
Expand Down
1 change: 1 addition & 0 deletions contrib/windeploy/detached-sig-create.sh
Expand Up @@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
if [ -z "$OSSLSIGNCODE" ]; then
OSSLSIGNCODE=osslsigncode
fi
Expand Down
1 change: 1 addition & 0 deletions share/genbuild.sh
Expand Up @@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
if [ $# -gt 1 ]; then
cd "$2" || exit 1
fi
Expand Down
1 change: 1 addition & 0 deletions src/qt/res/movies/makespinner.sh
Expand Up @@ -2,6 +2,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
FRAMEDIR=$(dirname $0)
for i in {0..35}
do
Expand Down
1 change: 1 addition & 0 deletions test/lint/commit-script-check.sh
Expand Up @@ -11,6 +11,7 @@
# The resulting script should exactly transform the previous commit into the current
# one. Any remaining diff signals an error.

export LC_ALL=C
if test "x$1" = "x"; then
echo "Usage: $0 <commit>..."
exit 1
Expand Down
1 change: 1 addition & 0 deletions test/lint/git-subtree-check.sh
Expand Up @@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
DIR="$1"
COMMIT="$2"
if [ -z "$COMMIT" ]; then
Expand Down
4 changes: 4 additions & 0 deletions test/lint/lint-all.sh
Expand Up @@ -7,6 +7,10 @@
# This script runs all contrib/devtools/lint-*.sh files, and fails if any exit
# 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

SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
Expand Down
1 change: 1 addition & 0 deletions test/lint/lint-include-guards.sh
Expand Up @@ -6,6 +6,7 @@
#
# Check include guards.

export LC_ALL=C
HEADER_ID_PREFIX="BITCOIN_"
HEADER_ID_SUFFIX="_H"

Expand Down
1 change: 1 addition & 0 deletions test/lint/lint-includes.sh
Expand Up @@ -8,6 +8,7 @@
# Guard against accidental introduction of new Boost dependencies.
# Check includes: Check for duplicate includes. Enforce bracket syntax includes.

export LC_ALL=C
IGNORE_REGEXP="/(leveldb|secp256k1|univalue)/"

filter_suffix() {
Expand Down
1 change: 1 addition & 0 deletions test/lint/lint-locale-dependence.sh
@@ -1,5 +1,6 @@
#!/bin/bash

export LC_ALL=C
KNOWN_VIOLATIONS=(
"src/base58.cpp:.*isspace"
"src/bitcoin-tx.cpp.*stoul"
Expand Down
2 changes: 1 addition & 1 deletion test/lint/lint-logs.sh
Expand Up @@ -12,7 +12,7 @@
# There are some instances of LogPrintf() in comments. Those can be
# ignored


export LC_ALL=C
UNTERMINATED_LOGS=$(git grep --extended-regexp "LogPrintf?\(" -- "*.cpp" | \
grep -v '\\n"' | \
grep -v "/\* Continued \*/" | \
Expand Down
2 changes: 2 additions & 0 deletions test/lint/lint-python-shebang.sh
@@ -1,5 +1,7 @@
#!/bin/bash
# Shebang must use python3 (not python or python2)

export LC_ALL=C
EXIT_CODE=0
for PYTHON_FILE in $(git ls-files -- "*.py"); do
if [[ $(head -c 2 "${PYTHON_FILE}") == "#!" &&
Expand Down
2 changes: 2 additions & 0 deletions test/lint/lint-python.sh
Expand Up @@ -6,6 +6,8 @@
#
# Check for specified flake8 warnings in python files.

export LC_ALL=C

# E101 indentation contains mixed spaces and tabs
# E112 expected an indented block
# E113 unexpected indentation
Expand Down
4 changes: 4 additions & 0 deletions test/lint/lint-shell.sh
Expand Up @@ -6,6 +6,10 @@
#
# 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:
# SC2001: See if you can use ${variable//search/replace} instead.
# SC2004: $/${} is unnecessary on arithmetic variables.
Expand Down
1 change: 1 addition & 0 deletions test/lint/lint-tests.sh
Expand Up @@ -6,6 +6,7 @@
#
# Check the test suite naming conventions

export LC_ALL=C
EXIT_CODE=0

NAMING_INCONSISTENCIES=$(git grep -E '^BOOST_FIXTURE_TEST_SUITE\(' -- \
Expand Down
1 change: 1 addition & 0 deletions test/lint/lint-whitespace.sh
Expand Up @@ -8,6 +8,7 @@

# We can't run this check unless we know the commit range for the PR.

export LC_ALL=C
while getopts "?" opt; do
case $opt in
?)
Expand Down

0 comments on commit 88c0a30

Please sign in to comment.