Last active
August 29, 2015 14:13
-
-
Save dannyfallon/124b40b1308f9bf8fe72 to your computer and use it in GitHub Desktop.
Enables OS X RubyMine to use the current version of the JDK instead of forcing 1.6 (specifically for Yosemite)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# Get the java version, quit if it's not found | |
JAVA_VERSION=`java -version 2>&1 | head -n 1 | cut -d\" -f 2 | cut -c1-3` | |
if [ -z "$JAVA_VERSION" ]; then | |
echo "Unable to determine Java version, exiting" | |
exit | |
fi | |
# Make the Rubymine preferences directory | |
mkdir -p ~/Library/Preferences/RubyMine70 | |
# Copy the original idea.properties file (maintains app signing for patches/updates) | |
cp /Applications/RubyMine.app/Contents/bin/idea.properties ~/Library/Preferences/RubyMine70/ | |
# Replace the JVM version with the one we actually use | |
sed -i.bak "s/JVMVersion=.*/JVMVersion=$JAVA_VERSION*/g" ~/Library/Preferences/RubyMine70/idea.properties |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment