aliases: simplify excessively complex In_list function

This function is never used to find multiple needles at one time.

Gbp-Dch: Short
Closes: #952915
This commit is contained in:
jnqnfe 2015-01-06 03:36:55 +00:00 committed by Luca Boccassi
parent 0869a890ae
commit c1dcc4dd89
1 changed files with 5 additions and 8 deletions

View File

@ -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