xpp: fix bashism in xpp_debug

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10152 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Tzafrir Cohen 2011-08-24 08:11:38 +00:00
parent 41c24c400e
commit cdeaafb910

View File

@ -43,11 +43,10 @@ show_debug() {
list=''
for n in $dbg_names
do
if (( val & (1 << j) ))
then
if [ $(( val & (1 << j) )) -ne 0 ]; then
list="$list $n"
fi
let j++
j=$((j+1))
done
if [ "$list" = "" ]; then
list=' NONE'
@ -67,19 +66,19 @@ calc_debug() {
for n in $dbg_names
do
if [ "$wanted" = "$n" ]; then
(( val |= (1 << j) ))
: $(( val |= (1 << j) ))
found=1
elif [ "$wanted" = -"$n" ]; then
(( val &= ~(1 << j) ))
: $(( val &= ~(1 << j) ))
found=1
elif [ "$wanted" = "ANY" ]; then
(( val = ~0 ))
: $(( val = ~0 ))
found=1
elif [ "$wanted" = -"ANY" -o "$wanted" = "NONE" ]; then
(( val = 0 ))
val=0
found=1
fi
let j++
j=$((j+1))
done
if [ "$found" -eq 0 ]; then
echo >&2 "$0: Unknown debug flag '$wanted'"