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