File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,8 +95,9 @@ export TEMP_FILE
9595BASE_DIR=$( cd " $BASE_DIR " && pwd)
9696echo " Using base directory: $BASE_DIR "
9797
98- # Find all files recursively (excluding the lib/ build directory) and process them
99- find " $BASE_DIR " -type f -not -path " */lib/*" -exec bash -c ' process_file "$0"' {} \;
98+ # Find all files recursively (excluding the lib/ build directory) and process them.
99+ # Sort for reproducible byte-identical output across runs (find traversal order is filesystem-dependent).
100+ find " $BASE_DIR " -type f -not -path " */lib/*" | LC_ALL=C sort | while read -r f; do process_file " $f " ; done
100101
101102# Remove temporary file
102103rm -f " $TEMP_FILE "
@@ -107,8 +108,8 @@ cat >> "$OUTPUT_FILE" << 'EOF'
107108void initialize() {
108109EOF
109110
110- # Add each file to the map
111- find " $BASE_DIR " -type f -not -path " */lib/*" | while read -r file; do
111+ # Add each file to the map (sorted for reproducible output)
112+ find " $BASE_DIR " -type f -not -path " */lib/*" | LC_ALL=C sort | while read -r file; do
112113 relative_path=" ${file# $BASE_DIR / } "
113114 # Skip files outside BASE_DIR
114115 if [ " $relative_path " = " $file " ]; then
You can’t perform that action at this time.
0 commit comments