summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2011-07-03 14:11:09 +0200
committerThomas Bächler <thomas@archlinux.org>2011-07-03 14:11:09 +0200
commit179d4d5db40ec89144fbb11b0ef2e23105466890 (patch)
tree88ad0ffb4c48f422eed5661c834548aec5cac1ff /functions
parent320ef8bdebf867f18cf475bcf46dd578c6295fd7 (diff)
parenta079f4f2b3607ae4fcfe72dba913d6589fa35f4c (diff)
downloadmkinitcpio-179d4d5db40ec89144fbb11b0ef2e23105466890.tar.gz
mkinitcpio-179d4d5db40ec89144fbb11b0ef2e23105466890.tar.xz
Merge branch 'working' of https://github.com/falconindy/mkinitcpio into working
Diffstat (limited to 'functions')
-rw-r--r--functions5
1 files changed, 2 insertions, 3 deletions
diff --git a/functions b/functions
index ac7da7e..ffb00ec 100644
--- a/functions
+++ b/functions
@@ -46,9 +46,8 @@ in_array() {
# $1: needle
# ${@:2}: haystack
- local needle=$1; shift
- [[ -z $1 ]] && return 1 # Not Found
- local item
+ local item= needle=$1; shift
+
for item in "$@"; do
[[ $item = $needle ]] && return 0 # Found
done