Use test ([) instead of expr to compare integers.

expr $int1 '<' $int2 seems to be broken on some shells.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
cl349@firebug.cl.cam.ac.uk committed 2005-12-04 00:49:51 +01:00
1 parent 1e56ea4a43
commit f7ba08cc97
1 file changed
+2 -2
+2 -2
View File
@@ -119,7 +119,7 @@ _claim_lock()
local owner=$(_lock_owner "$lockdir")
local retries=0
while expr $retries '<' $LOCK_RETRIES
while [ $retries -lt $LOCK_RETRIES ]
do
mkdir "$lockdir" && trap "release_lock $1; sigerr" ERR &&
_update_lock_info "$lockdir" && return
@@ -131,7 +131,7 @@ _claim_lock()
retries=0
fi
if expr $retries '>' $LOCK_SPINNING_RETRIES
if [ $retries -gt $LOCK_SPINNING_RETRIES ]
then
sleep $LOCK_SLEEPTIME
else
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.