Loading envsetup.sh +13 −3 Original line number Diff line number Diff line Loading @@ -498,7 +498,7 @@ function choosevariant() export TARGET_BUILD_VARIANT=$default_value elif (echo -n $ANSWER | grep -q -e "^[0-9][0-9]*$") ; then if [ "$ANSWER" -le "${#VARIANT_CHOICES[@]}" ] ; then export TARGET_BUILD_VARIANT=${VARIANT_CHOICES[$(($ANSWER-1))]} export TARGET_BUILD_VARIANT=${VARIANT_CHOICES[$(($ANSWER-$_arrayoffset))]} fi else if check_variant $ANSWER Loading Loading @@ -596,7 +596,7 @@ function lunch() then if [ $answer -le ${#LUNCH_MENU_CHOICES[@]} ] then selection=${LUNCH_MENU_CHOICES[$(($answer-1))]} selection=${LUNCH_MENU_CHOICES[$(($answer-$_arrayoffset))]} fi else selection=$answer Loading Loading @@ -1572,7 +1572,7 @@ function godir () { echo "Invalid choice" continue fi pathname=${lines[$(($choice-1))]} pathname=${lines[$(($choice-$_arrayoffset))]} done else pathname=${lines[0]} Loading Loading @@ -1735,6 +1735,16 @@ if ! __detect_shell > /dev/null; then echo "WARNING: Only bash and zsh are supported, use of other shell may lead to erroneous results" fi # determine whether arrays are zero-based (bash) or one-based (zsh) _xarray=(a b c) if [ -z "${_xarray[${#_xarray[@]}]}" ] then _arrayoffset=1 else _arrayoffset=0 fi unset _xarray # Execute the contents of any vendorsetup.sh files we can find. for f in `test -d device && find -L device -maxdepth 4 -name 'vendorsetup.sh' 2> /dev/null | sort` \ `test -d vendor && find -L vendor -maxdepth 4 -name 'vendorsetup.sh' 2> /dev/null | sort` \ Loading Loading
envsetup.sh +13 −3 Original line number Diff line number Diff line Loading @@ -498,7 +498,7 @@ function choosevariant() export TARGET_BUILD_VARIANT=$default_value elif (echo -n $ANSWER | grep -q -e "^[0-9][0-9]*$") ; then if [ "$ANSWER" -le "${#VARIANT_CHOICES[@]}" ] ; then export TARGET_BUILD_VARIANT=${VARIANT_CHOICES[$(($ANSWER-1))]} export TARGET_BUILD_VARIANT=${VARIANT_CHOICES[$(($ANSWER-$_arrayoffset))]} fi else if check_variant $ANSWER Loading Loading @@ -596,7 +596,7 @@ function lunch() then if [ $answer -le ${#LUNCH_MENU_CHOICES[@]} ] then selection=${LUNCH_MENU_CHOICES[$(($answer-1))]} selection=${LUNCH_MENU_CHOICES[$(($answer-$_arrayoffset))]} fi else selection=$answer Loading Loading @@ -1572,7 +1572,7 @@ function godir () { echo "Invalid choice" continue fi pathname=${lines[$(($choice-1))]} pathname=${lines[$(($choice-$_arrayoffset))]} done else pathname=${lines[0]} Loading Loading @@ -1735,6 +1735,16 @@ if ! __detect_shell > /dev/null; then echo "WARNING: Only bash and zsh are supported, use of other shell may lead to erroneous results" fi # determine whether arrays are zero-based (bash) or one-based (zsh) _xarray=(a b c) if [ -z "${_xarray[${#_xarray[@]}]}" ] then _arrayoffset=1 else _arrayoffset=0 fi unset _xarray # Execute the contents of any vendorsetup.sh files we can find. for f in `test -d device && find -L device -maxdepth 4 -name 'vendorsetup.sh' 2> /dev/null | sort` \ `test -d vendor && find -L vendor -maxdepth 4 -name 'vendorsetup.sh' 2> /dev/null | sort` \ Loading