
It appears that when the subshell has a ||, the 'set -e' within subshell gets invalidated. This will work as expected: ( set -e; false; echo "should not get here" ) While this will not work as expected: ( set -e; false; echo "should not get here" ) || false We resolve it by using $? to detect the status of subshell. We also let the exitcode indicate how many packages that failed. While here we also refactor it so most of the loop happens within the subshell. This lets us set (or increase) rc variable once, and it reduces number of forks which gives slightly better performance.
Description
Build script to build Alpine packages (forked to remove busybox dependency)
Languages
Shell
61.4%
Roff
12%
C
10.4%
Perl
9.4%
Ruby
4.9%
Other
1.9%