Skip to content

Commit 3ecd672

Browse files
Even more reproducible builds
1 parent b72c490 commit 3ecd672

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

utils/list-licenses/list-licenses.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
ROOT_PATH="$(git rev-parse --show-toplevel)"
44
LIBS_PATH="${ROOT_PATH}/contrib"
5-
export LC_ALL=C
65

7-
ls -1 -d ${LIBS_PATH}/*/ | grep -F -v -- '-cmake' | sort | while read LIB; do
6+
ls -1 -d ${LIBS_PATH}/*/ | grep -F -v -- '-cmake' | LC_ALL=C sort | while read LIB; do
87
LIB_NAME=$(basename $LIB)
98

109
LIB_LICENSE=$(
11-
find "$LIB" -type f -and '(' -iname 'LICENSE*' -or -iname 'COPYING*' -or -iname 'COPYRIGHT*' ')' -and -not '(' -iname '*.html' -or -iname '*.htm' -or -iname '*.rtf' -or -name '*.cpp' -or -name '*.h' -or -iname '*.json' ')' -printf "%d\t%p\n" |
12-
sort | awk '
10+
LC_ALL=C find "$LIB" -type f -and '(' -iname 'LICENSE*' -or -iname 'COPYING*' -or -iname 'COPYRIGHT*' ')' -and -not '(' -iname '*.html' -or -iname '*.htm' -or -iname '*.rtf' -or -name '*.cpp' -or -name '*.h' -or -iname '*.json' ')' -printf "%d\t%p\n" |
11+
LC_ALL=C sort | LC_ALL=C awk '
1312
BEGIN { IGNORECASE=1; min_depth = 0 }
1413
/LICENSE/ { if (!min_depth || $1 <= min_depth) { min_depth = $1; license = $2 } }
1514
/COPY/ { if (!min_depth || $1 <= min_depth) { min_depth = $1; copying = $2 } }

0 commit comments

Comments
 (0)