tobitege | 9d0fcb0 | 2015-03-30 15:23:19 +0200 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # BlissRoms OTA Updater ota.xml generator |
| 4 | # |
| 5 | # Copyright (C) 2014 tobitege and BlissRoms |
| 6 | # |
| 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | # it under the terms of the GNU General Public License as published by |
| 9 | # the Free Software Foundation, either version 3 of the License, or |
| 10 | # (at your option) any later version. |
| 11 | # |
| 12 | # This program is distributed in the hope that it will be useful, |
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | # GNU General Public License for more details. |
| 16 | # |
| 17 | # You should have received a copy of the GNU General Public License |
| 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | |
| 20 | # Exports |
| 21 | |
| 22 | . $ANDROID_BUILD_TOP/vendor/bliss/tools/colors |
| 23 | |
| 24 | export otaxml=ota.xml |
| 25 | |
| 26 | if [ -f $otaxml ]; |
| 27 | then |
| 28 | rm -f $otaxml |
| 29 | fi |
| 30 | |
| 31 | cp vendor/bliss/ota.xml $otaxml |
| 32 | |
| 33 | touch $otaxml |
| 34 | |
| 35 | BLISS_OTA_MD5=$(cat "$OUT/$BLISS_OTA_VERNAME.zip.md5sum" | cut -d ' ' -f 1) |
| 36 | BLISS_OTA_FILESIZE=$(ls -la "$OUT/$BLISS_OTA_VERNAME.zip" | cut -d ' ' -f 5) |
| 37 | |
| 38 | sed -i "s/BLISS_OTA_ROM/${BLISS_OTA_ROM}/g" $otaxml |
| 39 | sed -i "s/BLISS_OTA_VERNAME/${BLISS_OTA_VERNAME}/g" $otaxml |
| 40 | sed -i "s/BLISS_OTA_VERSION/${BLISS_OTA_VER}/g" $otaxml |
| 41 | sed -i "s|BLISS_OTA_URL|${BLISS_OTA_URL}|g" $otaxml |
| 42 | sed -i "s/BLISS_OTA_MD5/${BLISS_OTA_MD5}/g" $otaxml |
| 43 | sed -i "s/BLISS_OTA_FILESIZE/${BLISS_OTA_FILESIZE}/g" $otaxml |
| 44 | sed -i "s/BLISS_DEVELOPER/${BLISS_DEVELOPER}/g" $otaxml |
| 45 | sed -i "s|BLISS_DONATE|${BLISS_DONATE}|g" $otaxml |
| 46 | |
| 47 | cp $otaxml $OUT/ |
| 48 | rm $otaxml |
| 49 | |
| 50 | echo ${bldppl}"ota.xml generated."${txtrst} |