wait for all compile commands to finish before exiting

BodgeMaster-unfinished
BodgeMaster 2022-06-27 04:49:05 +02:00
parent 82773f3429
commit d0464d4a8f
1 changed files with 10 additions and 6 deletions

View File

@ -33,9 +33,13 @@ wait
# Example: LD_LIBRARY_PATH=bin/lib bin/tools/dumpnbt
echo "Building tools..."
mkdir -pv bin/tools
# add compile commands to this variable
COMPILE_COMMANDS="
set -v
$CXX_WITH_FLAGS src/tools/dumpnbt.cpp -Lbin/lib -l:nbt.so -o bin/tools/dumpnbt &
"
sh <<< $COMPILE_COMMANDS
# add compile commands to this array
COMPILE_COMMANDS=(
"$CXX_WITH_FLAGS src/tools/dumpnbt.cpp -Lbin/lib -l:nbt.so -o bin/tools/dumpnbt"
)
for command in ${!COMPILE_COMMANDS[@]}; do
echo "${COMPILE_COMMANDS[command]}"
${COMPILE_COMMANDS[command]} &
done
wait