From 6ade7c4ea5e8cd80847058d06bbd2e6beec7c6c7 Mon Sep 17 00:00:00 2001 From: Will Ross Date: Thu, 24 May 2012 09:35:49 -0400 Subject: android-sdk: Add wrappers for platform_tools Add redirection wrappers for all of the utilities in platform-tools, not just adb. Also add emulator variant wrappers for tools. Closes #12751. Closes #13101. Signed-off-by: Adam Vandenberg --- Library/Formula/android-sdk.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/android-sdk.rb b/Library/Formula/android-sdk.rb index fe6fb437a..9ff8b4c39 100644 --- a/Library/Formula/android-sdk.rb +++ b/Library/Formula/android-sdk.rb @@ -19,8 +19,8 @@ class AndroidSdk < Formula mv 'tools', prefix %w[android apkbuilder ddms dmtracedump draw9patch etc1tool emulator - hierarchyviewer hprof-conv lint mksdcard monkeyrunner traceview - zipalign].each do |tool| + emulator-arm emulator-x86 hierarchyviewer hprof-conv lint mksdcard + monitor monkeyrunner traceview zipalign].each do |tool| (bin/tool).write <<-EOS.undent #!/bin/sh TOOL="#{prefix}/tools/#{tool}" @@ -37,12 +37,14 @@ class AndroidSdk < Formula dst.make_relative_symlink src end - (bin+'adb').write <<-EOS.undent - #!/bin/sh - ADB="#{prefix}/platform-tools/adb" - test -f "$ADB" && exec "$ADB" "$@" - echo Use the \\`android\\' tool to install the \\"Android SDK Platform-tools\\". - EOS + %w[aapt adb aidl dexdump dx fastboot llvm-rs-cc].each do |platform_tool| + (bin/platform_tool).write <<-EOS.undent + #!/bin/sh + PLATFORM_TOOL="#{prefix}/platform-tools/#{platform_tool}" + test -f "$PLATFORM_TOOL" && exec "$PLATFORM_TOOL" "$@" + echo Use the \\`android\\' tool to install the \\"Android SDK Platform-tools\\". + EOS + end end def caveats; <<-EOS.undent -- cgit v1.2.3