aboutsummaryrefslogtreecommitdiff
path: root/lock.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lock.sh')
-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