From f9f9787aa08f519b3df9953a6b8877f7e65950f0 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Wed, 14 Jan 2015 14:24:47 +0000 Subject: [PATCH] hush.in: Use `$' prefixes on variables in arithmetic expansions. Organization: Straylight/Edgeware From: Mark Wooding Omitting this is a Bashism, but one apparently permitted by Dash. --- hush.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hush.in b/hush.in index d5aebcb..2752cdf 100755 --- a/hush.in +++ b/hush.in @@ -167,16 +167,16 @@ exec 3>&- nlog=0 for i in "$logdir/$tag".*; do if [ ! -f "$i" ]; then continue; fi - nlog=$(( nlog + 1 )) + nlog=$(( $nlog + 1 )) done ## If there are too many, go through and delete some early ones. if [ $nlog -gt $maxlog ]; then - n=$(( nlog - maxlog )) + n=$(( $nlog - $maxlog )) for i in "$logdir/$tag".*; do if [ ! -f "$i" ]; then continue; fi rm -f "$i" - n=$(( n - 1 )) + n=$(( $n - 1 )) if [ $n -eq 0 ]; then break; fi done fi -- [mdw]