aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/android-ndk.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/Library/Formula/android-ndk.rb b/Library/Formula/android-ndk.rb
index 36938e384..b5da50e89 100644
--- a/Library/Formula/android-ndk.rb
+++ b/Library/Formula/android-ndk.rb
@@ -11,7 +11,17 @@ class AndroidNdk < Formula
def install
bin.mkpath
prefix.install Dir['*']
- %w[ ndk-build ndk-gdb ndk-stack ].each { |app| ln_s prefix+app, bin+app }
+
+ # Create a dummy script to launch the ndk apps
+ ndk_exec = prefix+'ndk-exec.sh'
+ (ndk_exec).write <<-EOS.undent
+ #!/bin/sh
+ BASENAME=`basename $0`
+ EXEC="#{prefix}/$BASENAME"
+ test -f "$EXEC" && exec "$EXEC" "$@"
+ EOS
+ (ndk_exec).chmod 0755
+ %w[ ndk-build ndk-gdb ndk-stack ].each { |app| ln_s ndk_exec, bin+app }
end
def caveats; <<-EOS