Skip to content

Commit b72c490

Browse files
Even more reproducible builds
1 parent a9c2f38 commit b72c490

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

utils/list-licenses/list-licenses.sh

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

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

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

1010
LIB_LICENSE=$(
11-
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" |
12-
awk '
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 '
1313
BEGIN { IGNORECASE=1; min_depth = 0 }
1414
/LICENSE/ { if (!min_depth || $1 <= min_depth) { min_depth = $1; license = $2 } }
1515
/COPY/ { if (!min_depth || $1 <= min_depth) { min_depth = $1; copying = $2 } }

0 commit comments

Comments
 (0)