summaryrefslogtreecommitdiffstats
path: root/lib/helpers.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/helpers.sh')
-rw-r--r--lib/helpers.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/helpers.sh b/lib/helpers.sh
new file mode 100644
index 0000000..b562eb6
--- /dev/null
+++ b/lib/helpers.sh
@@ -0,0 +1,9 @@
+function in_array() {
+ local hay needle=$1
+ shift
+ for hay; do
+ [[ $hay == $needle ]] && return 0
+ done
+
+ return 1
+}