aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormar77i <mar77i@users.noreply.github.com>2014-04-11 11:05:50 +0200
committermar77i <mar77i@users.noreply.github.com>2014-04-11 11:05:50 +0200
commit4f4bd122b940d19d90e23f9a012c51097d42dfbc (patch)
tree17f72dbd96243c1f3f7b4ed2e4a6be8b096eaeb2
parent0d9f550bb48f49c11bbf7220d74b9453731149c6 (diff)
lock.sh: Truls Beckens was right #1
-rwxr-xr-xlock.sh2
1 files changed, 1 insertions, 1 deletions
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