charansingh | d204b68 | 2011-02-02 01:35:29 +0530 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | export LOC="$PWD/out/target/product/leo" |
| 4 | |
| 5 | mkdir -p "$LOC"/temp |
| 6 | |
| 7 | cd "$LOC"/temp |
| 8 | echo "extract update.zip" |
| 9 | unzip -o -qq "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip |
| 10 | |
| 11 | echo "Making Leo Compatible Update script" |
| 12 | cd "$LOC" |
| 13 | cd "$LOC"/temp/META-INF/com/google/android |
| 14 | echo 'mount("yaffs2", "MTD", "boot", "/boot");' >> temp |
| 15 | echo 'package_extract_dir("boot", "/boot");' >> temp |
| 16 | grep -vw assert updater-script >> temp |
| 17 | rm -rf updater-script |
| 18 | grep -vw boot.img temp > updater-script |
| 19 | rm -rf temp |
| 20 | echo Zipping Package |
| 21 | cd "$LOC"/temp |
charansingh | 5ef6804 | 2011-03-27 17:23:20 +0530 | [diff] [blame] | 22 | rm -rf "$LOC"/temp/boot.img |
| 23 | rm -rf "$LOC"/temp/boot |
| 24 | cp -a "$LOC"/boot "$LOC"/temp/boot |
charansingh | d204b68 | 2011-02-02 01:35:29 +0530 | [diff] [blame] | 25 | rm -rf "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip |
| 26 | zip -9yr "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip * > /dev/null |
| 27 | cd "$LOC" |
| 28 | |
| 29 | echo Cleanup... |
| 30 | rm -rf "$LOC"/temp |
| 31 | |
| 32 | echo done |