Use LC_ALL=C for sort

This ensures that irrespective of the environment of the host, the
sorting order will be consistent and reproducible
This commit is contained in:
Roland Clobus 2023-08-04 17:20:43 +02:00
parent e663ec5b0e
commit f38a906715
No known key found for this signature in database
GPG Key ID: 62C57C6AA61495BD
2 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ do
\! -path './*SUMS' \
\! -path './*sum.txt' \
\! -path './*sum.README' \
-print0 | sort -z | xargs -0 ${CHECKSUM}sum > ${CHECKSUMS}
-print0 | LC_ALL=C sort -z | xargs -0 ${CHECKSUM}sum > ${CHECKSUMS}
cat > ${CHECKSUM}sum.README << EOF
The file ${CHECKSUMS} contains the ${CHECKSUM} checksums of all files on this medium.
@ -70,7 +70,7 @@ done
# File list
cd binary
find . | sed -e 's|^.||g' | grep "^/" | sort > ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.contents
find . | sed -e 's|^.||g' | grep "^/" | LC_ALL=C sort > ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.contents
cd "${OLDPWD}"
# Creating stage file

View File

@ -60,7 +60,7 @@ do
\! -path './*SUMS' \
\! -path './*sum.txt' \
\! -path './*sum.README' \
-print0 | sort -z | xargs -0 ${CHECKSUM}sum > ${CHECKSUMS}
-print0 | LC_ALL=C sort -z | xargs -0 ${CHECKSUM}sum > ${CHECKSUMS}
cat > ${CHECKSUM}sum.README << EOF
The file ${CHECKSUMS} contains the ${CHECKSUM} checksums of all files on this medium.
@ -74,7 +74,7 @@ EOF
# File list
cd ${DIRECTORY}
find . | sed -e 's|^.||g' | grep "^/" | sort > ../../${LB_IMAGE_NAME}-source.$(basename ${DIRECTORY}).contents
find . | sed -e 's|^.||g' | grep "^/" | LC_ALL=C sort > ../../${LB_IMAGE_NAME}-source.$(basename ${DIRECTORY}).contents
cd "${OLDPWD}"
done