blob: e282e56f18275dcd442bd4a132c298b9312361f6 [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
22rm -rf boot.img
23cp -a "$LOC"/boot boot
24rm -rf "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip
25zip -9yr "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip * > /dev/null
26cd "$LOC"
27
28echo Cleanup...
29rm -rf "$LOC"/temp
30
31echo done