d204b68f86
Change-Id: Idb55f5a74dd07a2964fbc87d98f522bb1d921947
32 lines
801 B
Bash
Executable File
32 lines
801 B
Bash
Executable File
#!/bin/bash
|
|
|
|
export LOC="$PWD/out/target/product/leo"
|
|
|
|
mkdir -p "$LOC"/temp
|
|
|
|
cd "$LOC"/temp
|
|
echo "extract update.zip"
|
|
unzip -o -qq "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip
|
|
|
|
echo "Making Leo Compatible Update script"
|
|
cd "$LOC"
|
|
cd "$LOC"/temp/META-INF/com/google/android
|
|
echo 'mount("yaffs2", "MTD", "boot", "/boot");' >> temp
|
|
echo 'package_extract_dir("boot", "/boot");' >> temp
|
|
grep -vw assert updater-script >> temp
|
|
rm -rf updater-script
|
|
grep -vw boot.img temp > updater-script
|
|
rm -rf temp
|
|
echo Zipping Package
|
|
cd "$LOC"/temp
|
|
rm -rf boot.img
|
|
cp -a "$LOC"/boot boot
|
|
rm -rf "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip
|
|
zip -9yr "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip * > /dev/null
|
|
cd "$LOC"
|
|
|
|
echo Cleanup...
|
|
rm -rf "$LOC"/temp
|
|
|
|
echo done
|