d/shuffle-binaries: Make error detection/message overt
authorElliott Mitchell <ehem+debian@m5p.com>
Fri, 17 Jul 2020 06:37:42 +0000 (23:37 -0700)
committerHans van Kranenburg <hans@knorrie.org>
Fri, 26 Feb 2021 19:10:29 +0000 (20:10 +0100)
The reason for the `ls` at the end is pretty straightforward if you think
about it, mainly confirming the shuffle step did something.  Yet that
is a bit non-obvious, and the error message produced on failure is poor
("No such file or directory" simply means the script failed somewhere?).
Add an overt error message.

Signed-off-by: Elliott Mitchell <ehem+debian@m5p.com>
Acked-by: Hans van Kranenburg <hans@knorrie.org>
debian/shuffle-binaries

index cff6de54283115fe184f6d93dbaf1bfe25b87038..31aa01e2bd6e77adebe40db5e1c9fc72848babd0 100755 (executable)
@@ -47,4 +47,7 @@ for binary in `find $t/usr/{bin,sbin} -type f`; do
        )
 done
 
-ls debian/shuffle-binaries.stamp
+if [ ! -e "$0.stamp" ]; then
+       echo "Failed to shuffle binaries!" 1>&2
+       exit 1
+fi