forked from openkylin/platform_build
Merge "Envsetup: Fix lunch choice with number in zsh" am: 2647067ae9
am: 845a588927
am: c0d20c3e93
Change-Id: I66ca3e2c54454d86e455e62643ddc8ce4876e3e7
This commit is contained in:
commit
b4c030781e
|
@ -585,7 +585,13 @@ function lunch()
|
|||
local choices=($(TARGET_BUILD_APPS= LUNCH_MENU_CHOICES="${LUNCH_MENU_CHOICES[@]}" get_build_var COMMON_LUNCH_CHOICES))
|
||||
if [ $answer -le ${#choices[@]} ]
|
||||
then
|
||||
selection=${choices[$(($answer-1))]}
|
||||
# array in zsh starts from 1 instead of 0.
|
||||
if [ -n "$ZSH_VERSION" ]
|
||||
then
|
||||
selection=${choices[$(($answer))]}
|
||||
else
|
||||
selection=${choices[$(($answer-1))]}
|
||||
fi
|
||||
fi
|
||||
else
|
||||
selection=$answer
|
||||
|
|
Loading…
Reference in New Issue