Skip to content

Commit

Permalink
Repeatedly run build, give up after 20 attempts.
Browse files Browse the repository at this point in the history
  • Loading branch information
icedream committed Jun 10, 2022
1 parent d60b42d commit 2ad9b56
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion compile-buildroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,19 @@ export PATH="${PATH// /}"
buildroot_path=$(echo buildroot/*/)
buildroot_path=${buildroot_path%/}

make -C buildroot/*/ -j$(nproc) BR2_EXTERNAL=../../buildroot-customizations
failed=0
for i in $(seq 1 20); do
if ! make -C buildroot/*/ -j$(nproc) BR2_EXTERNAL=../../buildroot-customizations; then
failed=$?
continue
fi
failed=0
break
done
if [ $failed -ne 0 ]; then
echo "ERROR: make failed after multiple attempts. Aborting." >&2
exit $failed
fi
filter_package_files <"${buildroot_path}/output/build/packages-file-list.txt" | \
tar -c -C "${buildroot_path}/output/target/" --owner=root --group=root -T - |\
sudo ./mount.sh --write tar -xp
Expand Down

0 comments on commit 2ad9b56

Please sign in to comment.