mirror of
https://github.com/Orc/discount.git
synced 2026-09-25 04:10:00 +03:00
clean up acLookfor so it doesn't do a break 3 where a return would do
This commit is contained in:
+6
-6
@@ -474,25 +474,25 @@ acLookFor () {
|
||||
*) __mode=-x
|
||||
;;
|
||||
esac
|
||||
oldifs="$IFS"
|
||||
for program in $*; do
|
||||
case "$program" in
|
||||
/*) if [ $__mode $program -a -f $program ]; then
|
||||
echo $program
|
||||
break 2
|
||||
return
|
||||
fi ;;
|
||||
*)
|
||||
oldifs="$IFS"
|
||||
IFS=":"
|
||||
for x in $path; do
|
||||
if [ $__mode $x/$program -a -f $x/$program ]; then
|
||||
echo $x/$program
|
||||
break 3
|
||||
IFS="$oldifs"
|
||||
return
|
||||
fi
|
||||
done ;;
|
||||
done
|
||||
IFS="$oldifs" ;;
|
||||
esac
|
||||
done
|
||||
IFS="$oldifs"
|
||||
unset __mode
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user