19 lines
629 B
Diff
19 lines
629 B
Diff
diff --git a/copy-firmware.sh b/copy-firmware.sh
|
|
index 6a32127..7c1821e 100755
|
|
--- a/copy-firmware.sh
|
|
+++ b/copy-firmware.sh
|
|
@@ -164,9 +164,10 @@ if [ "$num_jobs" -gt 1 ]; then
|
|
parallel -j"$num_jobs" -a "$parallel_args_file"
|
|
fi
|
|
|
|
-# Verify no broken symlinks
|
|
-if test "$(find "$destdir" -xtype l | wc -l)" -ne 0 ; then
|
|
- err "Broken symlinks found:\n$(find "$destdir" -xtype l)"
|
|
+# Verify no broken symlinks without relying on non-portable find -xtype.
|
|
+broken_links=$(find "$destdir" -type l ! -exec test -e {} \; -print)
|
|
+if test -n "$broken_links"; then
|
|
+ err "Broken symlinks found:\n$broken_links"
|
|
fi
|
|
|
|
exit 0
|