curl https://storage.googleapis.com/git-repo-downloads/repo > repo
chmod a+x repo
./repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.1_r6
./repo sync
. build/envsetup.sh
fails with:
build/envsetup.sh: line 508: LUNCH_MENU_CHOICES[@]: unbound variable
on Ubuntu 16.04.
Also mentioned at: https://bbs.archlinux.org/viewtopic.php?id=135180