[Captivate Android Development] zmore:
This is a simple shell script -- for linux users -- that automates most of the manual process involved in getting new Cyanogenmod nightlies onto your phone.

(Note: adb from the Android SDK needs to be installed for anything but the download and md5check to work.)

Up until I wrote this script, my manual method for getting nightlies onto my phone was to check if a new nightly is available, then wget it, copy/paste the posted md5sum into nightly.zip.md5sum, wait for the dl to finish, then compare md5sums, adb push the nightly and md5sum onto my phone, check md5sums again in case of bad flash blocks, then 'adb reboot recovery' to boot into clockworkmod recovery when I'm ready to flash it. After 69 nightlies, I'm tired of doing it, so I wasted about an hour writing this script instead, and it'll probably take another 20 nightlies before that time invested starts getting paid back. :)

And why not use the ROM Manager app instead? Don't have to, and don't want to ($$$).

How to use this script:

extract it to the directory where you usually download your nightlies, and chmod +x it if necessary

edit the script by changing adbpushdest="/sdcard/" to where you want the ROM uploaded to on your phone.

edit the "captivatemtd" in the cm7page_url="http://download.cyanogenmod.com/?device=captivatemtd" nightly download url to match your phone.

run it in the same directory as your downloaded nightlies: "./cm7nightly-get-check-push.sh"

f all went well, it'll automatically check for a new nightly, download it, compare md5sums on your HDD, ask to upload it to your phone, ask to check md5sums again on the phone, ask to delete ROMs older than the newest two, then ask to reboot your phone in recovery for you to manually flash it in clockworkmod. If all didn't go well, then fix it yourself, and then complain here with your fix.

Example output:

$ ./cm7nightly-get-check-push.sh
Getting CM7 Nightly Downloads Page... OK
New CM7 nightly available. Downloading cm_captivatemtd_full-94.zip ...
--2011-08-21 13:18:18-- http://download.cyanogenmod.com/get/cm_captivatemtd_full-94.zip
Resolving download.cyanogenmod.com... 174.127.68.28
<...SNIP...>
HTTP request sent, awaiting response... 200 OK
Length: 101778587 (97M) [application/zip]
Saving to: “cm_captivatemtd_full-94.zip”

100%[=================================================================================================================>] 101,778,587 621K/s in 2m 42s

2011-08-21 13:21:00 (615 KB/s) - “cm_captivatemtd_full-94.zip” saved [101778587/101778587]

OK
Checking file integrity of downloaded ROM (comparing md5sums)...
md5sumgood is [a805be9624bd1118bbb909b706152e6e]
md5sumactual is [a805be9624bd1118bbb909b706152e6e]
OK

Upload cm_captivatemtd_full-94.zip to /sdcard/ on phone? [y/N]? y
Uploading cm_captivatemtd_full-94.zip.md5sum ... 0 KB/s (33 bytes in 0.052s)
OK
Uploading cm_captivatemtd_full-94.zip ... 2137 KB/s (101778587 bytes in 46.505s)
OK

Recheck file integrity of latest ROM on phone in case of faulty flash media? [y/N]? y
md5sumgood is [a805be9624bd1118bbb909b706152e6e]
md5sumactual is [a805be9624bd1118bbb909b706152e6e]
OK

OLD ROMS:
cm_captivatemtd_full-85.zip
NEWEST TWO ROMS:
cm_captivatemtd_full-88.zip
cm_captivatemtd_full-94.zip

Delete ROM files older than the newest two? [y/N]? y
Deleting ROM files older than the last two: cm_captivatemtd_full-85.zip ...
Deleting cm_captivatemtd_full-85.zip on HDD ...
Deleting /sdcard/cm_captivatemtd_full-85.zip on Phone ...

Reboot android device in recovery mode to flash now? [y/N]? n

REMEMBER to manually flash the nightly on your phone, and remember to drink your Ovaltine

Done.

This script could obviously be a bit more robust in error handling, but it works well enough for me. Just thought I'd post it here in case anyone else might find it useful. Post any problems/fixes you have (or just let this thread die).

-------------------------------------

# CHANGELOG:

# 0.6 - 20110821:

# * added md5sum check ON PHONE (if adb installed) in case of bad flash blocks

# * added option to delete ROMs on HDD and on phone that are older than the last two downloads

# * show actual md5sums

# 0.5:

# * initial release