# HG changeset patch # User Joerg Sonnenberger # Date 2020-05-07 13:00:33 # Node ID f727939f3513f4ae2600bfa8fa96026048855106 # Parent b15a37d85dbe16a4823a8eb02e02a34af1cddb89 tests: use regular POSIX shell wait-on-file requires one POSIX extension (sleep with non-integral argument), but it doesn't require any bash extensions, so just require a normal POSIX shell. While here, use consistent formatting without redundant ; Differential Revision: https://phab.mercurial-scm.org/D8500 diff --git a/tests/testlib/wait-on-file b/tests/testlib/wait-on-file --- a/tests/testlib/wait-on-file +++ b/tests/testlib/wait-on-file @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # wait up to TIMEOUT seconds until a WAIT_ON_FILE is created. # @@ -22,13 +22,11 @@ if [ $# -eq 3 ]; then create="$3" fi -if [ -n "$create" ]; -then +if [ -n "$create" ]; then touch "$create" create="" fi -while [ "$timer" -gt 0 ] && [ ! -f "$wait_on" ]; -do +while [ "$timer" -gt 0 ] && [ ! -f "$wait_on" ]; do timer=$(( $timer - 1)) sleep 0.01 done