[Droid Eris Android Development] gnarlyc:
Hey folks. I've wanted to add this functionality to Android Builder for a while, but being me... I've done other things. We'll here's what I have now. It's a script that grabs CM6 source, Conap's vendor tree, and compiles it all into a zip. It's currently a standalone script and has some remnants from the Froyo AOSP version, but anyway... It seems to work although the resulting ROM needs tweaking.

(I had to change out the kernel and modules and it still wouldn't pull up the home screen. It did flash and boot though. Progress!)

Many thanks to Armin Čoralić for the first part of the script, Conap for the vendor tree and helping me to work this out, and the CM team for their awesome work.

#!/bin/bash
# Armin Čoralić http://blog.coralic.nl
# Part 1 modified by gnarlyc
# Part 2 created mostly by gnarlyc although I just took the commands from the CM site and made them into a script.

# Set $KITCHEN_ROOT equal to the current directory. This makes the code 'portable'.
export KITCHEN_ROOT=`pwd`

echo "Setting up the folders....."

# Create the folder structure. This can be slimmed down, but I made this script by cutting and pasting some of Android Builder...
mkdir -p $KITCHEN_ROOT/builder/source/projects/CM6/

if [ ! -d $KITCHEN_ROOT/builder/bin ]
then
mkdir $KITCHEN_ROOT/builder/bin
fi

# Make sure that buidler/bin is in the path and then get the repo binary.
export PATH=$PATH:$KITCHEN_ROOT/builder/bin
curl http://android.git.kernel.org/repo > $KITCHEN_ROOT/builder/bin/repo
chmod a+x $KITCHEN_ROOT/builder/bin/repo

# Initialize the repo.
echo "Initialize GIT repo....."
cd $KITCHEN_ROOT/builder/source/projects/CM6
repo init -u git://github.com/CyanogenMod/android.git -b froyo

# grab the CM6 source. This will just do updates after you do it once, so there's no harm in doing this every time. Although, you could start over if you wanted...
echo "Sync repo....."
repo sync

# Probably not needed for CM6...
echo "Import GPG key"
echo "-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2X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qt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----" > /tmp/android.gpg
gpg --import < /tmp/android.gpg
rm -rf /tmp/android.gpg

echo "All Done."

# Cleanup (optional, but I like to start fresh... Just comment out if you want.)
cd $KITCHEN_ROOT/builder/source/projects/CM6/device/htc
rm -rf desirec/

# grab vendor tree
git clone https://github.com/Conap30/android_device_htc_desirec.git

# rename the resulting folder
mv android_device_htc_desirec/ desirec/

#remove unneeded folder
rm -rf desirec/vendor/

# I have already grabbed the needed proprietary files and zipped them up into a zip in a folder above the current folder.
# There are different ways that you can do this.
mkdir -p $KITCHEN_ROOT/builder/source/projects/CM6/vendor/htc/desirec/proprietary
rm -rf $KITCHEN_ROOT/builder/source/projects/CM6/vendor/htc/desirec/proprietary/*

cd $KITCHEN_ROOT
cp ../proprietary.zip $KITCHEN_ROOT/builder/source/projects/CM6/vendor/htc/desirec/proprietary
cd $KITCHEN_ROOT/builder/source/projects/CM6/vendor/htc/desirec/proprietary
unzip proprietary.zip

# I don't know why it wouldn't work for me without modding this. I can't change the source directly, so...
echo 'ro.modversion=CyanogenMod6-Eris' >> $KITCHEN_ROOT/builder/source/projects/CM6/device/htc/desirec/system.prop

# run extract-files.sh --- This needs to be run even though the proprietary files are already there.
cd $KITCHEN_ROOT/builder/source/projects/CM6/device/htc/desirec
./extract-files.sh

# setup the enviroment
cd $KITCHEN_ROOT/builder/source/projects/CM6
. build/envsetup.sh

# If you take out the 'generic_desirec-eng', it will give you a menu instead.
lunch generic_desirec-eng

# This compiles the source with the vendor tree included, makes the zip, signs it, and drops it into the out/target/product/desirec directory. It will tell you this.
make -j$(grep -c processor /proc/cpuinfo) otapackage

Please feel free to use this and help me tweak it. Your comments will be appreciated. You can cut and paste the code or download the attachment and take the '.txt' off of the end. This is LINUX ONLY by the way...

EDIT: Adding latest version to OP.