Compiling Cyanogenmod for Desire on Sourceforge shell

Initial instructions tell us to

mkdir -p ~/bin
mkdir -p ~/android/system
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

Confirm that repo downloads properly and that it’s actually the repo script and not an html page!

repo init -u git://github.com/CyanogenMod/android.git -b gingerbread

I initially had syntax errors with it. I think compiling and installing a new version of Python locally fixed. Disadvantage of Sourceforge is that you cant do an apt install. Anything that you need should be downloaded from tarball and painstakingly (in some cases) compiled. But I think I’m beginning to get the hang of it.

At this point, for SF, one has to change git:// to http://. https also doesnt work.

So

repo init -u git://github.com/CyanogenMod/android.git -b gingerbread

becomes

repo init -u http://github.com/CyanogenMod/android.git -b gingerbread

You will asked name and email. So far so good.
However the version that downloads may contain git:// addresses. So one has to edit the repo manifest.

cd .repo
grep for git:

You will note that it is in the file manifest.xml

manifest.xml-2-
manifest.xml-3-  
manifest.xml-6-
manifest.xml-7-  
manifest.xml-10-

Change to

manifest.xml:4:           fetch="http://android.git.kernel.org/"
manifest.xml:8:           fetch="http://github.com/"

Now you can proceed normally:

repo sync -j16