From 4f4bd122b940d19d90e23f9a012c51097d42dfbc Mon Sep 17 00:00:00 2001 From: mar77i Date: Fri, 11 Apr 2014 11:05:50 +0200 Subject: lock.sh: Truls Beckens was right #1 --- lock.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lock.sh') diff --git a/lock.sh b/lock.sh index 22191fe..9a9cdd6 100755 --- a/lock.sh +++ b/lock.sh @@ -11,7 +11,7 @@ lock() { echo "lock $1 found, waiting for unlock" >&2 while true; do sleep 2; - if [[ ! -d "$1" ]]; then + if mkdir "$1" &>/dev/null; then return fi done -- cgit v1.2.3