Previously to use Google's Repo tool needed to manually download and install it. No need anymore on Ubuntu - repo is available in standard repositories, install using:
sudo apt-get install repo
Have fun compiling your Android build ;)
This weekend I decided to replace stock Android 7.1.1 running on my Motorola Nexus 6 device to Lineage OS which is successor of CyanogenMod - probably the most famous custom Android ROM ever.
Lineage OS wiki has a great article on how to build Lineage for shamu (this is the codename for...