Taken from =>

https://github.com/CyanogenMod/android_build/blob/cm-10.1/tools/releasetools/ota_from_target_files