Skip to content

Commit

Permalink
build: more robust failure detection
Browse files Browse the repository at this point in the history
- Carry over only the relevant files (images and faillogs)
- Delete faillog only if there are actual images for the device
  • Loading branch information
pktpls committed Nov 5, 2024
1 parent 1d09f81 commit 157815f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,15 @@ EOF
|& tee "bin/targets/$target/faillogs/$p.log" >&2

# if build resulted in image files, we can delete the log
if ls "bin/targets/$target/"*"$p"* >/dev/null; then
cnt="$(find "bin/targets/$target" -name '*.bin' -or -name '*.img' | wc -l)"
if [ "$cnt" -gt 0 ] ; then
rm -v "bin/targets/$target/faillogs/$p.log"
fi
done
) \
|& tee "$destdir/build.log" >&2

mv "$ibdir/bin/targets/$target"/* "$destdir/"

find "$ibdir/bin/targets/$target" \( -name '*.bin' -or -name '*.img' -or -name 'faillogs' \) -exec cp -avx '{}' "$destdir/" \;

echo "Done."

0 comments on commit 157815f

Please sign in to comment.