Skip to content

Instantly share code, notes, and snippets.

@Xuanwo
Created November 14, 2018 02:48
Show Gist options
  • Save Xuanwo/7554aaca24bba39e0928700ac6363892 to your computer and use it in GitHub Desktop.
Save Xuanwo/7554aaca24bba39e0928700ac6363892 to your computer and use it in GitHub Desktop.
Diff
:) diff `which phpstorm` `which goland`
4c4
< # PhpStorm startup script.
---
> # GoLand startup script.
10c10
< TITLE="Cannot start PhpStorm"
---
> TITLE="Cannot start GoLand"
60c60
< # Try (in order): PHPSTORM_JDK, phpstorm.jdk, ./jre64, JDK_HOME, JAVA_HOME, "java" in PATH.
---
> # Try (in order): GOLAND_JDK, goland.jdk, ./jre64, JDK_HOME, JAVA_HOME, "java" in PATH.
62,63c62,63
< if [ -n "$PHPSTORM_JDK" -a -x "$PHPSTORM_JDK/bin/java" ]; then
< JDK="$PHPSTORM_JDK"
---
> if [ -n "$GOLAND_JDK" -a -x "$GOLAND_JDK/bin/java" ]; then
> JDK="$GOLAND_JDK"
66,67c66,67
< if [ -z "$JDK" -a -s "$HOME/.PhpStorm2018.2/config/phpstorm.jdk" ]; then
< USER_JRE=`"$CAT" $HOME/.PhpStorm2018.2/config/phpstorm.jdk`
---
> if [ -z "$JDK" -a -s "$HOME/.GoLand2018.2/config/goland.jdk" ]; then
> USER_JRE=`"$CAT" $HOME/.GoLand2018.2/config/goland.jdk`
137c137
< message "No JDK found. Please validate either PHPSTORM_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation."
---
> message "No JDK found. Please validate either GOLAND_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation."
151,152c151,152
< if [ -n "$PHPSTORM_PROPERTIES" ]; then
< IDE_PROPERTIES_PROPERTY="-Didea.properties.file=$PHPSTORM_PROPERTIES"
---
> if [ -n "$GOLAND_PROPERTIES" ]; then
> IDE_PROPERTIES_PROPERTY="-Didea.properties.file=$GOLAND_PROPERTIES"
156c156
< if [ -n "$PHPSTORM_VM_OPTIONS" -a -r "$PHPSTORM_VM_OPTIONS" ]; then
---
> if [ -n "$GOLAND_VM_OPTIONS" -a -r "$GOLAND_VM_OPTIONS" ]; then
158c158
< VM_OPTIONS_FILE="$PHPSTORM_VM_OPTIONS"
---
> VM_OPTIONS_FILE="$GOLAND_VM_OPTIONS"
162c162
< elif [ -r "$HOME/.PhpStorm2018.2/config/phpstorm$BITS.vmoptions" ]; then
---
> elif [ -r "$HOME/.GoLand2018.2/config/goland$BITS.vmoptions" ]; then
164,165c164,165
< VM_OPTIONS_FILE="$HOME/.PhpStorm2018.2/config/phpstorm$BITS.vmoptions"
< elif [ -r "$IDE_BIN_HOME/phpstorm$BITS.vmoptions" ]; then
---
> VM_OPTIONS_FILE="$HOME/.GoLand2018.2/config/goland$BITS.vmoptions"
> elif [ -r "$IDE_BIN_HOME/goland$BITS.vmoptions" ]; then
167c167
< VM_OPTIONS_FILE="$IDE_BIN_HOME/phpstorm$BITS.vmoptions"
---
> VM_OPTIONS_FILE="$IDE_BIN_HOME/goland$BITS.vmoptions"
171c171
< VM_OPTIONS_FILE="$IDE_BIN_HOME/$OS_SPECIFIC/phpstorm$BITS.vmoptions"
---
> VM_OPTIONS_FILE="$IDE_BIN_HOME/$OS_SPECIFIC/goland$BITS.vmoptions"
195,197c195,196
< CLASSPATH="$CLASSPATH:$JDK/lib/tools.jar"
< if [ -n "$PHPSTORM_CLASSPATH" ]; then
< CLASSPATH="$CLASSPATH:$PHPSTORM_CLASSPATH"
---
> if [ -n "$GOLAND_CLASSPATH" ]; then
> CLASSPATH="$CLASSPATH:$GOLAND_CLASSPATH"
207,209c206,208
< "-XX:ErrorFile=$HOME/java_error_in_PHPSTORM_%p.log" \
< "-XX:HeapDumpPath=$HOME/java_error_in_PHPSTORM.hprof" \
< -Didea.paths.selector=PhpStorm2018.2 \
---
> "-XX:ErrorFile=$HOME/java_error_in_GOLAND_%p.log" \
> "-XX:HeapDumpPath=$HOME/java_error_in_GOLAND.hprof" \
> -Didea.paths.selector=GoLand2018.2 \
212c211
< -Didea.platform.prefix=PhpStorm -Didea.jre.check=true \
---
> -Didea.platform.prefix=GoLand \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment