aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions4
1 files changed, 1 insertions, 3 deletions
diff --git a/functions b/functions
index a29eb7f..4e184f6 100644
--- a/functions
+++ b/functions
@@ -165,12 +165,10 @@ status() {
# usage : in_array( $needle, $haystack )
# return : 0 - found
# 1 - not found
-# Copied from makepkg
in_array() {
- [[ $2 ]] || return 1
local needle=$1; shift
local item
- for item in "$@"; do
+ for item; do
[[ ${item#@} = $needle ]] && return 0
done
return 1 # Not Found