Skip to content
Snippets Groups Projects
Commit f727939f3513 authored by Jörg Sonnenberger's avatar Jörg Sonnenberger
Browse files

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
parent b15a37d85dbe
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#!/bin/sh
#
# wait up to TIMEOUT seconds until a WAIT_ON_FILE is created.
#
......@@ -22,8 +22,7 @@
create="$3"
fi
if [ -n "$create" ];
then
if [ -n "$create" ]; then
touch "$create"
create=""
fi
......@@ -27,8 +26,7 @@
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment