From 3860a82c21733d981bbd5a90a0c0a802121e7d3f Mon Sep 17 00:00:00 2001
From: Jakob Unterwurzacher
Date: Mon, 5 Mar 2018 21:11:46 +0100
Subject: test.bash: skip flock if not available

MacOS does not have it installed by default.
---
 test.bash | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test.bash b/test.bash
index ec46d9b..721c9aa 100755
--- a/test.bash
+++ b/test.bash
@@ -12,7 +12,9 @@ mkdir -p $TESTDIR
 (
 # Prevent multiple parallel test.bash instances as this causes
 # all kinds of mayham
-if ! flock -n 200 ; then
+if ! command -v flock > /dev/null ; then
+	echo "flock is not available, skipping"
+elif ! flock -n 200 ; then
 	echo "Could not acquire lock on $LOCKFILE - already running?"
 	exit 1
 fi
-- 
cgit v1.2.3