Fix two mistakes in art script rewrite.
Fix typo and mimic ART behavior for having just one -cp.
Test: art
Change-Id: Ic7c566f3dd29d1cad4c130e81cb7e7f609b5b1d1
diff --git a/tools/art b/tools/art
index 23eb23b..7bd4c54 100644
--- a/tools/art
+++ b/tools/art
@@ -229,11 +229,14 @@
shift
;;
-Ximage:*)
- DEX2OAT_BOOTIMAGE=$1
+ DEX2OAT_BOOT_IMAGE=$1
# Remove '-Ximage:' from the argument.
DEX2OAT_BOOT_IMAGE=${DEX2OAT_BOOT_IMAGE##-Ximage:}
;;
-cp)
+ # Reset any previously parsed classpath, just like dalvikvm
+ # only supports one -cp argument.
+ DEX2OAT_CLASSPATH=()
# TODO: support -classpath and CLASSPATH
local oifs=$IFS
IFS=':'