Fixed priority lookup in .go_conf
This commit is contained in:
parent
775950f5af
commit
61c985e1b0
@ -60,9 +60,8 @@ function go() {
|
||||
for ((i = 0; i < ${#LOCS[@]}; i++))
|
||||
do
|
||||
LOC=${LOCS[i]}
|
||||
LOCATION=$(ls -d "$UDEV/$SITE/$LOC/*$ARG3*/" 2> /dev/null )
|
||||
LOCATION=$(ls -d "$UDEV/$SITE/$LOC/"*"$ARG3"*/ 2> /dev/null )
|
||||
if [[ -n "$LOCATION" ]]; then
|
||||
LOCATION="$LOC/$LOCATION"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@ -71,7 +70,7 @@ function go() {
|
||||
shift; shift
|
||||
|
||||
if [[ -n "$LOCATION" ]]; then
|
||||
__dive $CC "$UDEV/$SITE/$LOCATION/" $@
|
||||
__dive $CC "$LOCATION" $@
|
||||
return $?
|
||||
else
|
||||
__dive $CC "$UDEV/$SITE" "$ARG3" $@
|
||||
@ -84,6 +83,11 @@ __dive() {
|
||||
WDIR=$2
|
||||
shift; shift
|
||||
|
||||
if [ -z "$*" ]; then
|
||||
$CC "$WDIR"
|
||||
return $?
|
||||
fi
|
||||
|
||||
OIFS=$IFS
|
||||
IFS="*"
|
||||
PATT="*$**"
|
||||
|
Loading…
Reference in New Issue
Block a user