Skip to content
Snippets Groups Projects
Commit a68b3752 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

wait-on-file: properly wait on any files and symlink

This make the utility more useful, for example to wait on a lock file.
We also add an explicit -L check since the lock are "weird" symlink.

Differential Revision: https://phab.mercurial-scm.org/D12617
parent 883be4c7
No related branches found
No related tags found
2 merge requests!168branching: merge default into stable,!122Queuing a series from phabricator
......@@ -29,7 +29,7 @@
touch "$create"
create=""
fi
while [ "$timer" -gt 0 ] && [ ! -f "$wait_on" ]; do
while [ "$timer" -gt 0 ] && !([ -e "$wait_on" ] || [ -L "$wait_on" ]) ; do
timer=$(( $timer - 1))
sleep 0.02
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