aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKang-Che Sung <explorer09@gmail.com>2017-07-15 11:38:58 +0800
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-18 19:20:58 +0200
commit6f13dd1d6574bbc0eacd5574d2e451596a92df5d (patch)
tree8c6f10a8f719463367beff02d6a6002df59e7857
parent3df48bdde96632a83cacff1f7795837a160de1d4 (diff)
downloadbusybox-w32-6f13dd1d6574bbc0eacd5574d2e451596a92df5d.tar.gz
busybox-w32-6f13dd1d6574bbc0eacd5574d2e451596a92df5d.tar.bz2
busybox-w32-6f13dd1d6574bbc0eacd5574d2e451596a92df5d.zip
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>
-rwxr-xr-xmake_single_applets.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/make_single_applets.sh b/make_single_applets.sh
index 8ad7a7406..329a27d32 100755
--- a/make_single_applets.sh
+++ b/make_single_applets.sh
@@ -54,18 +54,18 @@ for app; do
54 fi 54 fi
55 55
56 if ! yes '' | make oldconfig >busybox_make_${app}.log 2>&1; then 56 if ! yes '' | make oldconfig >busybox_make_${app}.log 2>&1; then
57 : $((fail++)) 57 fail=$((fail+1))
58 echo "Config error for ${app}" 58 echo "Config error for ${app}"
59 mv .config busybox_config_${app} 59 mv .config busybox_config_${app}
60 elif ! make $makeopts >>busybox_make_${app}.log 2>&1; then 60 elif ! make $makeopts >>busybox_make_${app}.log 2>&1; then
61 : $((fail++)) 61 fail=$((fail+1))
62 grep -i -e error: -e warning: busybox_make_${app}.log 62 grep -i -e error: -e warning: busybox_make_${app}.log
63 echo "Build error for ${app}" 63 echo "Build error for ${app}"
64 mv .config busybox_config_${app} 64 mv .config busybox_config_${app}
65 elif ! grep -q '^#define NUM_APPLETS 1$' include/NUM_APPLETS.h; then 65 elif ! grep -q '^#define NUM_APPLETS 1$' include/NUM_APPLETS.h; then
66 grep -i -e error: -e warning: busybox_make_${app}.log 66 grep -i -e error: -e warning: busybox_make_${app}.log
67 mv busybox busybox_${app} 67 mv busybox busybox_${app}
68 : $((fail++)) 68 fail=$((fail+1))
69 echo "NUM_APPLETS != 1 for ${app}: `cat include/NUM_APPLETS.h`" 69 echo "NUM_APPLETS != 1 for ${app}: `cat include/NUM_APPLETS.h`"
70 mv .config busybox_config_${app} 70 mv .config busybox_config_${app}
71 else 71 else