make_single_applets: fix ": $((fail++))" expansion error

$((fail++)) is not a required expression in POSIX, and in "dash" it
could produce an error like this:

    ./make_single_applets.sh: 61: arithmetic expression: expecting primary: "fail++"

Replace this with something portable: fail=$((fail+1)) would work.

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Kang-Che Sung 2017-07-15 11:38:58 +08:00 committed by Denys Vlasenko
parent c4ddf04b68
commit ed2b922537

View File

@ -54,18 +54,18 @@ for app; do
fi fi
if ! yes '' | make oldconfig >busybox_make_${app}.log 2>&1; then if ! yes '' | make oldconfig >busybox_make_${app}.log 2>&1; then
: $((fail++)) fail=$((fail+1))
echo "Config error for ${app}" echo "Config error for ${app}"
mv .config busybox_config_${app} mv .config busybox_config_${app}
elif ! make $makeopts >>busybox_make_${app}.log 2>&1; then elif ! make $makeopts >>busybox_make_${app}.log 2>&1; then
: $((fail++)) fail=$((fail+1))
grep -i -e error: -e warning: busybox_make_${app}.log grep -i -e error: -e warning: busybox_make_${app}.log
echo "Build error for ${app}" echo "Build error for ${app}"
mv .config busybox_config_${app} mv .config busybox_config_${app}
elif ! grep -q '^#define NUM_APPLETS 1$' include/NUM_APPLETS.h; then elif ! grep -q '^#define NUM_APPLETS 1$' include/NUM_APPLETS.h; then
grep -i -e error: -e warning: busybox_make_${app}.log grep -i -e error: -e warning: busybox_make_${app}.log
mv busybox busybox_${app} mv busybox busybox_${app}
: $((fail++)) fail=$((fail+1))
echo "NUM_APPLETS != 1 for ${app}: `cat include/NUM_APPLETS.h`" echo "NUM_APPLETS != 1 for ${app}: `cat include/NUM_APPLETS.h`"
mv .config busybox_config_${app} mv .config busybox_config_${app}
else else