aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-08-05 10:15:32 -0700
committerAaron Griffin <aaronmgriffin@gmail.com>2009-08-05 10:15:32 -0700
commit602eb29574318edebd6cf3c9e82d97c504a6dd13 (patch)
tree50b359c3caefd27fa126b2e1288babe9b7dcdef1 /functions
parent0e36fec20e3c27eaa459e1083833cb85ccf2b34b (diff)
downloadinitscripts-602eb29574318edebd6cf3c9e82d97c504a6dd13.tar.xz
Revert previous commit chunk: in_array fixes
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'functions')
-rw-r--r--functions18
1 files changed, 7 insertions, 11 deletions
diff --git a/functions b/functions
index 0f333d4..7c8e4df 100644
--- a/functions
+++ b/functions
@@ -159,17 +159,13 @@ status() {
# 1 - not found
# Copied from makepkg
in_array() {
- local needle=$1; shift
- [ -z "$1" ] && return 1 # Not Found
- local item
- for item in "$@"; do
- local c="${item:0:1}"
- if [ "$c" == "!" -o "$c" == "@" ]; then
- item="${item:1}"
- fi
- [ "$item" = "$needle" ] && return 0 # Found
- done
- return 1 # Not Found
+ local needle=$1; shift
+ [ -z "$1" ] && return 1 # Not Found
+ local item
+ for item in "$@"; do
+ [ "$item" = "$needle" ] && return 0 # Found
+ done
+ return 1 # Not Found
}
# daemons: