diff --git a/bin/nix/idea.sh b/bin/nix/idea.sh index 8396571dac78..f81b8298b51b 100644 --- a/bin/nix/idea.sh +++ b/bin/nix/idea.sh @@ -23,12 +23,12 @@ fi SCRIPT_LOCATION=$0 # Step through symlinks to find where the script really is -while [ -L $SCRIPT_LOCATION ]; do - SCRIPT_LOCATION=`readlink -e $SCRIPT_LOCATION` +while [ -L "$SCRIPT_LOCATION" ]; do + SCRIPT_LOCATION=`readlink -e "$SCRIPT_LOCATION"` done -IDEA_HOME=`dirname $SCRIPT_LOCATION`/.. -IDEA_BIN_HOME=`dirname $SCRIPT_LOCATION` +IDEA_HOME=`dirname "$SCRIPT_LOCATION"`/.. +IDEA_BIN_HOME=`dirname "$SCRIPT_LOCATION"` export JAVA_HOME export IDEA_HOME