make shell math operations style more succulent

Convert the style:
	var=$((${var} + 1))
to:
	: $(( var += 1 ))

The latter is easier to read imo.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger
2011-11-10 21:46:08 -05:00
parent 0510c473d4
commit ef1ff1b4f2
32 changed files with 98 additions and 98 deletions

View File

@@ -36,7 +36,7 @@ _ifindex()
{
local line= i=-2
while read line; do
i=$((${i} + 1))
: $(( i += 1 ))
[ ${i} -lt 1 ] && continue
case "${line}" in
"${IFACE}:"*) echo "${i}"; return 0;;
@@ -44,7 +44,7 @@ _ifindex()
done < /proc/net/dev
# Return the next available index
i=$((${i} + 1))
: $(( i += 1 ))
echo "${i}"
return 1
}
@@ -290,7 +290,7 @@ iproute2_post_start()
while [ $n -ge 0 ]; do
_iproute2_ipv6_tentative || break
sleep 1
n=$(($n - 1))
: $(( n -= 1 ))
done
[ $n -ge 0 ]
eend $?