aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hylafaxplus/common-functions-busybox-awk.patch
blob: 3e9ddd6031b0d2a6b72b92ea21d8792149529912 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/util/common-functions.sh.in b/util/common-functions.sh.in
index 38049e3..54cfd6b 100644
--- a/util/common-functions.sh.in
+++ b/util/common-functions.sh.in
@@ -40,7 +40,7 @@ setInfoSize()
 		DICTTIMETORECV DICTSIGNALRATE DICTDATAFORMAT DICTERRCORRECT \
 		DICTCALLID1 DICTCALLID2 DICTCALLID3 DICTCALLID4 DICTCALLID \
 		DICTCALLID6 DICTCALLID7 DICTRECEIVEDON DICTCOMMID; do
-	THISLEN="`eval echo \\\""$"$ITEM\\\" | $AWK 'BEGIN {L=0} length>L {L=length} END {print L}' | $SED 's/ //g'`"
+	THISLEN=`eval 'echo ${#'$ITEM'}'`
 	if [ $THISLEN -gt $INFOSIZE ]; then INFOSIZE=$THISLEN; fi
     done
 }
@@ -57,7 +57,7 @@ setItemSize()
 		DICTCALLS DICTPAGES DICTATTEMPTS DICTDIRNUM DICTRECEIVER DICTQUALITY \
 		DICTPAGEWIDTH DICTPAGELENGTH DICTDATAFORMAT DICTREMOTEEQUIPMENT \
 		DICTREMOTESTATION DICTSIGNALRATE; do
-	THISLEN="`eval echo \\\""$"$ITEM\\\" | $AWK 'BEGIN {L=0} length>L {L=length} END {print L}' | $SED 's/ //g'`"
+	THISLEN=`eval 'echo ${#'$ITEM'}'`
 	if [ $THISLEN -gt $ITEMSIZE ]; then ITEMSIZE=$THISLEN; fi
     done
 }