Avoid possible build dependency on locale and filesystem order

This commit is contained in:
Alexey Milovidov 2021-04-24 23:01:07 +03:00
parent 280c0666a5
commit 3705dbfabc
3 changed files with 8 additions and 2 deletions

View File

@ -31,6 +31,9 @@
set -e set -e
# Avoid dependency on locale
LC_ALL=C
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
cd $CUR_DIR cd $CUR_DIR

View File

@ -2,6 +2,8 @@
set -x set -x
LC_ALL=C
# doesn't actually cd to directory, but return absolute path # doesn't actually cd to directory, but return absolute path
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# cd to directory # cd to directory
@ -10,7 +12,7 @@ cd $CUR_DIR
CONTRIBUTORS_FILE=${CONTRIBUTORS_FILE=$CUR_DIR/StorageSystemContributors.generated.cpp} CONTRIBUTORS_FILE=${CONTRIBUTORS_FILE=$CUR_DIR/StorageSystemContributors.generated.cpp}
# if you don't specify HEAD here, without terminal `git shortlog` would expect input from stdin # if you don't specify HEAD here, without terminal `git shortlog` would expect input from stdin
git shortlog HEAD --summary | perl -lnE 's/^\s+\d+\s+(.+)/ "$1",/; next unless $1; say $_' > $CONTRIBUTORS_FILE.tmp git shortlog HEAD --summary | perl -lnE 's/^\s+\d+\s+(.+)/ "$1",/; next unless $1; say $_' | sort > $CONTRIBUTORS_FILE.tmp
# If git history not available - dont make target file # If git history not available - dont make target file
if [ ! -s $CONTRIBUTORS_FILE.tmp ]; then if [ ! -s $CONTRIBUTORS_FILE.tmp ]; then

View File

@ -2,8 +2,9 @@
ROOT_PATH="$(git rev-parse --show-toplevel)" ROOT_PATH="$(git rev-parse --show-toplevel)"
LIBS_PATH="${ROOT_PATH}/contrib" LIBS_PATH="${ROOT_PATH}/contrib"
LC_ALL=C
ls -1 -d ${LIBS_PATH}/*/ | grep -F -v -- '-cmake' | while read LIB; do ls -1 -d ${LIBS_PATH}/*/ | grep -F -v -- '-cmake' | sort | while read LIB; do
LIB_NAME=$(basename $LIB) LIB_NAME=$(basename $LIB)
LIB_LICENSE=$( LIB_LICENSE=$(