Address feedback on art script.
Test: art
Change-Id: I1beeb0211a2b437739ec1ab448b92d77b92c7af7
diff --git a/tools/art b/tools/art
index 3bc722e..9c032c0 100644
--- a/tools/art
+++ b/tools/art
@@ -183,7 +183,7 @@
}
function run_dex2oat() {
- CLASS_LOADER_CONTEXT=
+ local class_loader_context=
for dex_file in "${DEX2OAT_CLASSPATH[@]}"
do
while [ -h "$dex_file" ]; do
@@ -206,14 +206,14 @@
--runtime-arg -Xnorelocate \
--boot-image=$DEX2OAT_BOOT_IMAGE \
--instruction-set=$ISA \
- --class-loader-context="PCL[$CLASS_LOADER_CONTEXT]" \
+ --class-loader-context="PCL[$class_loader_context]" \
"${DEX2OAT_FLAGS[@]}" \
--dex-file=$dex_file \
--oat-file=$oat_file
- if [[ ! -z $CLASS_LOADER_CONTEXT ]]; then
- CLASS_LOADER_CONTEXT+=":"
+ if [[ -n $class_loader_context ]]; then
+ class_loader_context+=":"
fi
- CLASS_LOADER_CONTEXT+="$dex_file"
+ class_loader_context+="$dex_file"
done
}
@@ -368,7 +368,7 @@
fi
# Follow all sym links to get the program name.
-if [ z"$BASH_SOURCE" != z ]; then
+if [[ -n "$BASH_SOURCE" ]]; then
PROG_NAME="$BASH_SOURCE"
else
PROG_NAME="$0"