diff options
author | jnqnfe <jnqnfe@gmail.com> | 2015-01-06 03:36:55 +0000 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2020-03-05 22:07:50 +0000 |
commit | c1dcc4dd898c2d6f214dcc7ea23de73ab37cef7b (patch) | |
tree | 9e4668f3bbe6dd646d51c90b0c94cc2a0c3c685a /functions/aliases.sh | |
parent | 0869a890ae461c01a3c29a81f972605abbd23b9e (diff) | |
download | vyos-live-build-c1dcc4dd898c2d6f214dcc7ea23de73ab37cef7b.tar.gz vyos-live-build-c1dcc4dd898c2d6f214dcc7ea23de73ab37cef7b.zip |
aliases: simplify excessively complex In_list function
This function is never used to find multiple needles at one time.
Gbp-Dch: Short
Closes: #952915
Diffstat (limited to 'functions/aliases.sh')
-rwxr-xr-x | functions/aliases.sh | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/functions/aliases.sh b/functions/aliases.sh index 3df028f61..7ec1cd3f2 100755 --- a/functions/aliases.sh +++ b/functions/aliases.sh @@ -15,18 +15,15 @@ Find_files () In_list () { - NEEDLES="${1}" + local NEEDLE="${1}" shift for ITEM in ${@} do - for NEEDLE in ${NEEDLES} - do - if [ "${NEEDLE}" = "${ITEM}" ] - then - return 0 - fi - done + if [ "${NEEDLE}" = "${ITEM}" ] + then + return 0 + fi done return 1 |