Browse Source

Fixed sde_wrapper_discriminator() to not freeze when there is no discriminator

karasz/new-early
Alejandro Mery 18 years ago
parent
commit
14bcf43ef5
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      lib/sde-wrapper-discriminator.in

+ 4
- 2
lib/sde-wrapper-discriminator.in

@ -44,15 +44,17 @@ sde_wrapper_discriminator_help() {
sde_wrapper_discriminator() {
local combin= command="$1"; shift
local discriminators=$( sde_wrapper_discriminator_list $command )
if [ "$1" != "${1%-*}" ]; then
# trying to cheat, no dashes alowed
return
elif [ -x "$SDEROOT/bin/sde-$command-$1" ]; then
# discriminator given explicitly
echo "$1"
else
elif [ -n "$discriminators" ]; then
# given token may be an alias of a valid discriminator for this command
combin=$( grep -l "^#Alias: $1$" `sde_wrapper_discriminator_list $command` | head -n 1 )
combin=$( grep -l "^#Alias: $1$" $discriminators | head -n 1 )
echo $( sde_wrapper_name "$combin" )
fi
}

Loading…
Cancel
Save