Skip to content

Commit

Permalink
fix: ensure sorting is consistent and what is expected
Browse files Browse the repository at this point in the history
  • Loading branch information
tulilirockz committed Mar 1, 2025
1 parent ebfdcb1 commit c066186
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build_scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
# This file needs to exist otherwise running this in a RUN label makes it so bash strict mode doesnt work.
# Thus leading to silent failures

set -euo pipefail
set -xeuo pipefail

# Do not rely on any of these scripts existing in a specific path
# Make the names as descriptive as possible and everything that uses dnf for package installation/removal should have `packages-` as a prefix.

run_buildscripts_for() {
WHAT=$1
CUSTOM_NAME=$2
CUSTOM_NAME="${2:-}"
shift
shift
# Complex "find" expression here since there might not be any overrides
find "/var/tmp/build_scripts/overrides/$WHAT" -iname "*-*.sh" -type f -maxdepth 1 -print0 | sort | while IFS= read -r -d $'\0' script; do
find "/var/tmp/build_scripts/overrides/$WHAT" -maxdepth 1 -iname "*-*.sh" -type f -print0 | sort --zero-terminated --sort=human-numeric | while IFS= read -r -d $'\0' script ; do
if [ "${CUSTOM_NAME}" != "" ] ; then
WHAT=$CUSTOM_NAME
fi
Expand Down

0 comments on commit c066186

Please sign in to comment.