mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-23 08:26:39 +08:00
removing -e
tests when cheking for -f
or -d
adding local variable flag and setting the variable if java home isn't taken care of in the first if check. For some reason there were different tab widths for this bottom section, unifying to what the top was at -- 2 spaces.
This commit is contained in:
parent
efa2746e45
commit
228b9c5e34
|
@ -9,22 +9,22 @@ end
|
|||
|
||||
# ONLY checked on OSX! Please add for other OS's...
|
||||
if test -z $JAVA_HOME
|
||||
if test -e "/usr/libexec/java_home" -a -f "/usr/libexec/java_home"
|
||||
set -gx JAVA_HOME (/usr/libexec/java_home)
|
||||
end
|
||||
set java_homes "/Library/Java/Home" "/System/Library/Frameworks/JavaVM.framework/Home"
|
||||
if test -z $JAVA_HOME
|
||||
for file in $java_homes
|
||||
echo $file
|
||||
if test -e $file -a -d $file
|
||||
set -gx JAVA_HOME $file
|
||||
break
|
||||
end
|
||||
if test -f "/usr/libexec/java_home"
|
||||
set -gx JAVA_HOME (/usr/libexec/java_home)
|
||||
end
|
||||
|
||||
if test -z $JAVA_HOME
|
||||
set -l java_homes "/Library/Java/Home" "/System/Library/Frameworks/JavaVM.framework/Home"
|
||||
for file in $java_homes
|
||||
if test -d $file
|
||||
set -gx JAVA_HOME $file
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if test -z $JAVA_HOME
|
||||
echo "GVM: JAVA_HOME not set please set JAVA_HOME."
|
||||
echo "GVM: JAVA_HOME not set please set JAVA_HOME."
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user