Skip to content

Commit

Permalink
Fix assert check
Browse files Browse the repository at this point in the history
  • Loading branch information
agravelot committed Oct 2, 2015
1 parent a8608e5 commit b607b4a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion aroma/META-INF/com/google/android/aroma-config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ loadlang("langs/en.lang");
ini_set("rom_name", "Bootloader Changer");
ini_set("rom_version", "2.3.2");
ini_set("rom_author", "Nevax - xda@NevaX1");
#Set by script
#SetByScript
ini_set("rom_date", "29th September 2015");

#Font
Expand Down
4 changes: 2 additions & 2 deletions aroma/META-INF/com/google/android/updater-script
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ ui_print(" ");
if
(file_getprop("/tmp/aroma/bootloader.prop", "selected.2")=="1")
then
## 17 : Added by ./tools/variant/*.sh
## 18 : Added by ./tools/variant/*.sh
#17:AddedByScript
#18:AddedByScript
endif;
ui_print(" ");
ui_print(" ");
Expand Down
6 changes: 3 additions & 3 deletions tools/variant/assert-F320x.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

#updater-script
perl -i -pe 's/.*/ ui_print(" assert f320k/l/s : OK"); / if $.==18' updater-script
perl -i -pe 's/.*/ assert(getprop("ro.product.device") == "f320s" || getprop("ro.build.product") == "f320s" || getprop("ro.product.device") == "f320l" || getprop("ro.build.product") == "f320l" || getprop("ro.product.device") == "f320k" || getprop("ro.build.product") == "f320k" || getprop("ro.product.device") == "g2" || getprop("ro.build.product") == "g2" || getprop("ro.product.device") == "galbi" || getprop("ro.build.product") == "galbi" || abort("This package is for device: f320k,f320l,f320s,g2,galbi; this device is " + getprop("ro.product.device") + ".");); / if $.==17' updater-script
perl -i -pe 's/.*/ ui_print(" assert F320x : OK"); / if $.==18' updater-script
perl -i -pe 's/.*/ assert(getprop("ro.product.device") == "f320k" || getprop("ro.build.product") == "f320k" || getprop("ro.product.device") == "f320l" || getprop("ro.build.product") == "f320l" || getprop("ro.product.device") == "f320s" || getprop("ro.build.product") == "f320s" || getprop("ro.product.device") == "g2" || getprop("ro.build.product") == "g2" || getprop("ro.product.device") == "galbi" || getprop("ro.build.product") == "galbi" || abort("This package is for device: f320x,g2,galbi; this device is " + getprop("ro.product.device") + ".");); / if $.==17' updater-script

#aroma config
perl -i -pe 's/.*/ ini_set("rom_device", "G2 F320K/S/L"); / if $.==13' aroma-config
perl -i -pe 's/.*/ ini_set("rom_device", "G2 F320x"); / if $.==13' aroma-config
8 changes: 8 additions & 0 deletions tools/variant/assert-F320x.sh.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

#updater-script
perl -i -pe 's/.*/ ui_print(" assert f320k/l/s : OK"); / if $.==18' updater-script
perl -i -pe 's/.*/ assert(getprop("ro.product.device") == "f320s" || getprop("ro.build.product") == "f320s" || getprop("ro.product.device") == "f320l" || getprop("ro.build.product") == "f320l" || getprop("ro.product.device") == "f320k" || getprop("ro.build.product") == "f320k" || getprop("ro.product.device") == "g2" || getprop("ro.build.product") == "g2" || getprop("ro.product.device") == "galbi" || getprop("ro.build.product") == "galbi" || abort("This package is for device: f320k,f320l,f320s,g2,galbi; this device is " + getprop("ro.product.device") + ".");); / if $.==17' updater-script

#aroma config
perl -i -pe 's/.*/ ini_set("rom_device", "G2 F320K/S/L"); / if $.==13' aroma-config
10 changes: 4 additions & 6 deletions tools/variant/assert-d802_5_6.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/bash

#updater-script
#perl -i -pe 's/.*/ ui_print(" assert D802/5/6 : OK"); / if $.==18' updater-script
#perl -i -pe 's/.*/ assert(getprop("ro.product.device") == "d802" || getprop("ro.build.product") == "d802" || getprop("ro.product.device") == "d806" || getprop("ro.build.product") == "d806" || getprop("ro.product.device") == "d805" || getprop("ro.build.product") == "d805" || getprop("ro.product.device") == "g2" || getprop("ro.build.product") == "g2" || getprop("ro.product.device") == "galbi" || getprop("ro.build.product") == "galbi" || abort("This package is for device: d802,d805,d806,g2,galbi; this device is " + getprop("ro.product.device") + ".");); / if $.==17' updater-script
sed -i -e 's/## 18 : Added by ./tools/variant/*.sh/ui_print(" assert D802/5/6 : OK");/' updater-script
sed -i -e 's/## 17 : Added by ./tools/variant/*.sh/assert(getprop("ro.product.device") == "d802" || getprop("ro.build.product") == "d802" || getprop("ro.product.device") == "d806" || getprop("ro.build.product") == "d806" || getprop("ro.product.device") == "d805" || getprop("ro.build.product") == "d805" || getprop("ro.product.device") == "g2" || getprop("ro.build.product") == "g2" || getprop("ro.product.device") == "galbi" || getprop("ro.build.product") == "galbi" || abort("This package is for device: d802,d805,d806,g2,galbi; this device is " + getprop("ro.product.device") + "."););/' updater-script
perl -i -pe 's/.*/ ui_print(" assert d802_5_6 : OK"); / if $.==18' updater-script
perl -i -pe 's/.*/ assert(getprop("ro.product.device") == "d802" || getprop("ro.build.product") == "d802" || getprop("ro.build.product") == "d805" || getprop("ro.product.device") == "d805" || getprop("ro.build.product") == "d806" || getprop("ro.product.device") == "d806" || getprop("ro.product.device") == "g2" || getprop("ro.build.product") == "g2" || getprop("ro.product.device") == "galbi" || getprop("ro.build.product") == "galbi" || abort("This package is for device: d802_5_6,g2,galbi; this device is " + getprop("ro.product.device") + ".");); / if $.==17' updater-script

#aroma config
#perl -i -pe 's/.*/ ini_set("rom_device", "G2 D802/5/6"); / if $.==13' aroma-config
sed -i -e 's/#Set by script/ui_print(" assert D802/5/6 : OK");/' aroma-config
perl -i -pe 's/.*/ ini_set("rom_device", "G2 D802_5_6"); / if $.==13' aroma-config
10 changes: 10 additions & 0 deletions tools/variant/assert-d802_5_6.sh.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

#updater-script
#perl -i -pe 's/.*/ ui_print(" assert D802/5/6 : OK"); / if $.==18' updater-script
#perl -i -pe 's/.*/ assert(getprop("ro.product.device") == "d802" || getprop("ro.build.product") == "d802" || getprop("ro.product.device") == "d806" || getprop("ro.build.product") == "d806" || getprop("ro.product.device") == "d805" || getprop("ro.build.product") == "d805" || getprop("ro.product.device") == "g2" || getprop("ro.build.product") == "g2" || getprop("ro.product.device") == "galbi" || getprop("ro.build.product") == "galbi" || abort("This package is for device: d802,d805,d806,g2,galbi; this device is " + getprop("ro.product.device") + ".");); / if $.==17' updater-script
sed -i -e 's/## 18 : Added by ./tools/variant/*.sh/ui_print(" assert D802/5/6 : OK");/' updater-script
sed -i -e 's/## 17 : Added by ./tools/variant/*.sh/assert(getprop("ro.product.device") == "d802" || getprop("ro.build.product") == "d802" || getprop("ro.product.device") == "d806" || getprop("ro.build.product") == "d806" || getprop("ro.product.device") == "d805" || getprop("ro.build.product") == "d805" || getprop("ro.product.device") == "g2" || getprop("ro.build.product") == "g2" || getprop("ro.product.device") == "galbi" || getprop("ro.build.product") == "galbi" || abort("This package is for device: d802,d805,d806,g2,galbi; this device is " + getprop("ro.product.device") + "."););/' updater-script
#aroma config
#perl -i -pe 's/.*/ ini_set("rom_device", "G2 D802/5/6"); / if $.==13' aroma-config
sed -i -e 's/#Set by script/ui_print(" assert D802/5/6 : OK");/' aroma-config

0 comments on commit b607b4a

Please sign in to comment.