Revert "Add a --toybox-path option to the art script."

This reverts commit 4b1c75d7381df4ab68f2634cbc13bcf83d6bf5fe.

Reason for revert: Breaks on go/lem

Change-Id: I4ec7d07ab8bd8b03355b61d4548f5de1a318fff7
diff --git a/tools/art b/tools/art
old mode 100755
new mode 100644
index 574ae35..fbc7992
--- a/tools/art
+++ b/tools/art
@@ -50,9 +50,6 @@
   --verbose                Run script verbosely.
   --no-clean               Don't cleanup oat directories.
   --no-compile             Don't invoke dex2oat before running.
-  --toybox-path <path>     Path for toybox executable. Provide this
-                           path if your device does not have
-                           'env', 'rm', 'dirname', 'basename', or 'mkdir'.
   --allow-default-jdwp     Don't automatically put in -XjdwpProvider:none.
                            You probably do not want this.
 
@@ -71,7 +68,7 @@
 
 function clean_android_data() {
   if [ "$DELETE_ANDROID_DATA" = "yes" ]; then
-    $TOYBOX rm -rf $ANDROID_DATA
+    rm -rf $ANDROID_DATA
   fi
 }
 
@@ -84,7 +81,7 @@
     echo "$@"
   fi
 
-  $TOYBOX env "$@"
+  env "$@"
 }
 
 # Parse a colon-separated list into an array (e.g. "foo.dex:bar.dex" -> (foo.dex bar.dex))
@@ -134,8 +131,8 @@
   local dirpath
 
   for path in "${classpath[@]}"; do
-    dirpath="$($TOYBOX dirname "$path")"
-    [[ -d "$dirpath" ]] && verbose_run $TOYBOX rm -rf "$dirpath/oat"
+    dirpath="$(dirname "$path")"
+    [[ -d "$dirpath" ]] && verbose_run rm -rf "$dirpath/oat"
   done
 }
 
@@ -195,9 +192,9 @@
       dex_file="$(readlink "$dex_file")"
     done
     # Create oat file directory.
-    verbose_run $TOYBOX mkdir -p $($TOYBOX dirname "$dex_file")/oat/$ISA
-    local oat_file=$($TOYBOX basename "$dex_file")
-    local oat_file=$($TOYBOX dirname "$dex_file")/oat/$ISA/${oat_file%.*}.odex
+    verbose_run mkdir -p $(dirname "$dex_file")/oat/$ISA
+    local oat_file=$(basename "$dex_file")
+    local oat_file=$(dirname "$dex_file")/oat/$ISA/${oat_file%.*}.odex
     # When running dex2oat use the exact same context as when running dalvikvm.
     # (see run_art function)
     verbose_run ANDROID_DATA=$ANDROID_DATA                    \
@@ -298,7 +295,6 @@
 EXTRA_OPTIONS=()
 DEX2OAT_FLAGS=()
 DEX2OAT_CLASSPATH=()
-TOYBOX=
 
 # Parse arguments
 while [[ "$1" = "-"* ]]; do
@@ -360,10 +356,6 @@
   --allow-default-jdwp)
     ALLOW_DEFAULT_JDWP="yes"
     ;;
-  --toybox-path)
-    TOYBOX=$2
-    shift
-    ;;
   --*)
     echo "unknown option: $1" 1>&2
     usage
@@ -441,7 +433,7 @@
     # by default.
     ANDROID_DATA="$ANDROID_DATA/local/tmp/android-data$$"
   fi
-  $TOYBOX mkdir -p "$ANDROID_DATA"
+  mkdir -p "$ANDROID_DATA"
   DELETE_ANDROID_DATA="yes"
 fi
 
@@ -487,7 +479,7 @@
 
   # Wipe dalvik-cache so that a subsequent run_art must regenerate it.
   # Leave $ANDROID_DATA intact since it contains our profile file.
-  $TOYBOX rm -rf "$ANDROID_DATA/dalvik-cache"
+  rm -rf "$ANDROID_DATA/dalvik-cache"
 
   # Append arguments so next invocation of run_art uses the profile.
   DEX2OAT_FLAGS+=(--profile-file="$PROFILE_PATH")