scripts: signall: fix finish function not called when apk adbsign failed v19
authorPetr Štetiar <ynezz@true.cz>
Sun, 29 Sep 2024 18:21:02 +0000 (18:21 +0000)
committerPetr Štetiar <ynezz@true.cz>
Sun, 29 Sep 2024 18:21:02 +0000 (18:21 +0000)
commit117e151a2164a47c436436e644514ce2bcf09b07
tree53795dcf9a0e929b0d23a4230a4523c8e0253b43
parent75b1334a00b099b884e5141fc9c52226c2404fc6
scripts: signall: fix finish function not called when apk adbsign failed

The `finish 3` was not being called when the `apk adbsign` command
failed within the `find` command using `-exec`. This happened because
`find` does not exit with a non-zero status when the command executed by
`-exec` fails, so the `|| finish 3` condition was not triggered.

So lets replace the `find ... -exec ...` construct with a loop and call
`finish 3` immediately if it fails.

Fixes: a94d4e15fdc1 ("add APK signing logic")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
scripts/signall.sh