lets use heads and tails

This commit is contained in:
milaq 2012-06-05 16:33:27 +02:00
parent 03bd44d0d1
commit 90aa4930ff

View File

@ -3,13 +3,15 @@
# Copyright (C) 2012 the cmhtcleo team
#
echo "updater-script: making compatible update script"
echo "updater-script: Making Compatible Update script"
cd $REPACK/ota/META-INF/com/google/android
cat updater-script >> temp
awk '{if (match($0,"boot.img")) exit; print > "head"}' updater-script
awk '/boot.img/ {p=1}; p==1 {print > "tail"}' updater-script
rm -rf updater-script
grep -vw "unmount" temp > updater-script
rm -rf temp
cat head > updater-script
rm -rf head
echo 'package_extract_file("checksys.sh","/tmp/checksys.sh");' >> updater-script
echo 'set_perm(0, 0, 755, "/tmp/checksys.sh");' >> updater-script
@ -20,7 +22,9 @@ echo 'else' >> updater-script
echo ' ui_print("MAGLDR detected, using rmnet for data connections");' >> updater-script
echo ' delete("/system/ppp");' >> updater-script
echo 'endif;' >> updater-script
echo 'unmount("/system");' >> updater-script
cat tail >> updater-script
rm -rf tail
echo "updater-script: copying checksys.sh"
cp $ANDROID_BUILD_TOP/device/htc/leo/releasetools/checksys.sh $REPACK/ota
cp $ANDROID_BUILD_TOP/device/htc/leo/releasetools/checksys.sh $REPACK/ota