Skip to content

Commit

Permalink
chore: randomize temp output directory (#3341)
Browse files Browse the repository at this point in the history
In this PR:
- Use `$RANDOM` (a shell variable that generates a random integer
between 0 and 32767) to randomize temp output directory to support
parallel generation.
  • Loading branch information
JoeWang1127 authored Nov 8, 2024
1 parent 7f6e470 commit b0adcf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hermetic_build/library_generation/generate_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ if [ -z "${os_architecture}" ]; then
os_architecture=$(detect_os_architecture)
fi

temp_destination_path="${output_folder}/temp_preprocessed"
temp_destination_path="${output_folder}/temp_preprocessed-$RANDOM"
mkdir -p "${output_folder}/${destination_path}"
if [ -d "${temp_destination_path}" ]; then
# we don't want the preprocessed sources of a previous run
Expand Down

0 comments on commit b0adcf9

Please sign in to comment.