aboutsummaryrefslogtreecommitdiff
path: root/libbutl/utility.bash.in
diff options
context:
space:
mode:
Diffstat (limited to 'libbutl/utility.bash.in')
-rw-r--r--libbutl/utility.bash.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/libbutl/utility.bash.in b/libbutl/utility.bash.in
new file mode 100644
index 0000000..bcc0f1b
--- /dev/null
+++ b/libbutl/utility.bash.in
@@ -0,0 +1,14 @@
+# file : libbutl/utility.bash.in
+# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+if [ "$butl_utility" = true ]; then
+ return 0
+else
+ butl_utility=true
+fi
+
+if (( BASH_VERSINFO[0] < 4 || BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 3 )); then
+ echo 'error: bash 4.3 or later is required' 2>&1
+ exit 1
+fi