Add support for OSX to intellij-gen.sh
Remove the hardcoded "linux-x86" path, and add support for darwin-x86.
Change-Id: I4c5db4683a6e8aac7d894e64415142d2ca5954a2
diff --git a/tools/idegen/intellij-gen.sh b/tools/idegen/intellij-gen.sh
index 860bd3c..3c4efc5 100755
--- a/tools/idegen/intellij-gen.sh
+++ b/tools/idegen/intellij-gen.sh
@@ -54,7 +54,11 @@
idegenjar=$script_dir/idegen.jar
if [ ! -e $idegenjar ]; then
# See if the jar is in the build directory.
- idegenjar=$root_dir/out/host/linux-x86/framework/idegen.jar
+ platform="linux"
+ if [ "Darwin" = "$(uname)" ]; then
+ platform="darwin"
+ fi
+ idegenjar="$root_dir/out/host/$platform-x86/framework/idegen.jar"
fi
if [ ! -e "$index_file" ]; then