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:
parent
0869a890ae
commit
c1dcc4dd89
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue