Skip to content

Commit

Permalink
Add adb to bin again
Browse files Browse the repository at this point in the history
And I also discovered that the android SDK update tool is retarded, so added comments and caveats to document this.
  • Loading branch information
mxcl committed Jan 25, 2011
1 parent 8855725 commit b5a918b
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions Library/Formula/android-sdk.rb
Expand Up @@ -7,7 +7,9 @@ class AndroidSdk <Formula
version 'r8'

def self.var_dirs
%w[platforms docs samples temp add-ons]
%w[platforms samples temp add-ons ]
# TODO docs, google-market_licensing and platform-tools
# See the long comment below for the associated problems
end

skip_clean var_dirs
Expand All @@ -32,11 +34,30 @@ def install
src.mkpath unless src.directory?
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 adb.
EOS
end

def caveats; <<-EOS.undent
We put the useful tools in the PATH. Like the `android` tool. You probably
want to run that now.
Now run the `android' tool to install the actual SDK stuff.
You will have to install the platform-tools EVERY time this formula updates.
If you want to try and fix this then see the comment in this formula.
EOS
end

# The `android' tool insists on deleting /usr/local/Cellar/android-sdl/rx/platform-tools
# and then installing the new one. So it is impossible for us to redirect
# the SDK location to var so that the platform-tools don't have to be
# freshly installed EVERY FUCKING time the base SDK updates.
# My disgust at Google's ineptitude here knows NO bounds. I can only LOL.
# And I do LOL. A lot. In Google's general direction. I can't stop LOLing.
# In fact, I may have LOLd myself into insanity.

# Ideas: make android a script that calls the actual android tool, but after
# that tool exits it repairs the directory locations?
end

0 comments on commit b5a918b

Please sign in to comment.