opticharger: use $ANDROID_HOST_OUT
Change-Id: I1b6988051ba7a83aa7149862ae8d96050bf59e23
diff --git a/tools/opticharger b/tools/opticharger
index 1207b6b..79a5da6 100755
--- a/tools/opticharger
+++ b/tools/opticharger
@@ -9,14 +9,6 @@
# cyanogen - shade@chemlab.org
# ChrisSoyars - me@ctso.me
-OUT_TARGET_HOST=$(uname -a | grep Darwin)
-if [ -z "$OUT_TARGET_HOST" ]
-then
- OUT_TARGET_HOST=linux-x86
-else
- OUT_TARGET_HOST=darwin-x86
-fi
-
set -e
QUIET=1
BASE=`pwd`
@@ -137,8 +129,8 @@
[ $QUIET ] || echo "Resigning with cert: `echo $CERT`"
- [ $QUIET ] || echo java -jar $OUT/../../../host/$OUT_TARGET_HOST/framework/signapk.jar $ANDROID_BUILD_TOP/$CERT $ANDROID_BUILD_TOP/$KEY $NAME signed_$NAME
- java -jar $OUT/../../../host/$OUT_TARGET_HOST/framework/signapk.jar $ANDROID_BUILD_TOP/$CERT $ANDROID_BUILD_TOP/$KEY $NAME signed_$NAME
+ [ $QUIET ] || echo java -jar $ANDROID_HOST_OUT/framework/signapk.jar $ANDROID_BUILD_TOP/$CERT $ANDROID_BUILD_TOP/$KEY $NAME signed_$NAME
+ java -jar $ANDROID_HOST_OUT/framework/signapk.jar $ANDROID_BUILD_TOP/$CERT $ANDROID_BUILD_TOP/$KEY $NAME signed_$NAME
[ $QUIET ] || echo "Zipalign.."
zipalign -f 4 signed_$NAME $BASE/$1
if [ ! $QUIET ]; then