From c7457a1667456804e659d0b0d2035cc3b67bb36e Mon Sep 17 00:00:00 2001 From: mateor Date: Thu, 10 Jan 2013 18:05:07 -0600 Subject: [PATCH] Finally fixed multiple mod patch dates It will match the first mod (if pdroid-type then by the build-query and then default to latest for the rest. For the mods we currently have that covers everything. Finally! --- auto_patcher | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/auto_patcher b/auto_patcher index 8f883ba..a9af71a 100755 --- a/auto_patcher +++ b/auto_patcher @@ -437,16 +437,16 @@ mods_info () { pd2.0) FLOOR=4.1.2 CEILING=4.1.2 - DESC="A fork of the open-source PDroid and Pdroid2.0 framework." + DESC="An expansion of the PDroid application/framework." DEV="CollegeDev" - DEPENDENCY="The PDroid2.0 app available at http://forum.xda-developers.com/showthread.php?t=1923576" + DEPENDENCY="The free PDroid2.0 app available at http://forum.xda-developers.com/showthread.php?t=1923576" ;; openpdroid) FLOOR=4.1.2 CEILING=4.2.1 - DESC="An expansion of the PDroid application/framework." - DEV="FFU5y/Community" - DEPENDENCY="The PDroidManager app available from Google Play or http://forum.xda-developers.com/showthread.php?t=1994860" + DESC="A fork of the open-source PDroid and Pdroid2.0 framework." + DEV="FFU5y/wbedard/mateorod/Community" + DEPENDENCY="The PDroidManager app freely available from Google Play or http://forum.xda-developers.com/showthread.php?t=1994860" ;; opendroid) echo "" @@ -682,11 +682,6 @@ esac # If patch date is specified on CLI, use that patch date if [ $# -gt 3 ]; then BID=${4//,/ }; - -# Multiple mods all default to latest- this isn't ideal. We should institute $BID array -# In python, we would use dictionary. Not sure about best for shell. A GUI would fix. -elif [[ ${#PID[@]} -gt 1 ]];then - BID=latest; else case $ANDR in gingerbread) @@ -728,6 +723,7 @@ else fi echo "... $PID patch date has been set to: $BID..." B=$BID + break done ;; esac @@ -1172,12 +1168,13 @@ else [ -f patches/$P/$A/$R/$B/smali.txt ] && SMALI=$(cat patches/$P/$A/$R/$B/smali.txt) MOVE=${SMALI##*/} for SMALI in ${SMALI[@]}; do - printtask "... overwriting $MOVE ..." - if [ -f patches/$P/$A/$R/provisionals/$SMALI ]; then - \cp -av patches/$P/$ANDR/$R/provisionals/$SMALI tmp/$SMALI >> "$LOG" - else - \cp -av patches/$P/$ANDR/provisionals/$SMALI tmp/$SMALI >> "$LOG" - fi + if [ -f patches/$P/$A/$R/provisionals/$SMALI ]; then + printtask "... overwriting $MOVE ..." + \cp -a patches/$P/$ANDR/$R/provisionals/$SMALI tmp/$SMALI >> "$LOG" + elif [ -f patches/$P/$A/provisionals/$SMALI ]; then + printtask "... overwriting $MOVE ..." + \cp -a patches/$P/$ANDR/provisionals/$SMALI tmp/$SMALI >> "$LOG" + fi done [[ -n ${DELS[@]} ]] && printtask "### delete patch $P/$A/$R/$B ###" -- 2.11.4.GIT