blob: 8f43b8dfe31611a3dd75be8d400f4caade86e89e [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"
Ladios Jonquil1f765132011-09-25 02:11:08 +08009unzip -o -qq "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$USER.zip
charansinghd204b682011-02-02 01:35:29 +053010
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
Ladios Jonquil1f765132011-09-25 02:11:08 +080025rm -rf "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$USER.zip
26zip -9yr "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$USER.zip * > /dev/null
charansinghd204b682011-02-02 01:35:29 +053027cd "$LOC"
28
29echo Cleanup...
30rm -rf "$LOC"/temp
31
32echo done