44function matlab_home_path ()
55 matlab_home = get (ENV , " MATLAB_HOME" , " " )
66 if isempty (matlab_home)
7- if is_linux ()
7+ if islinux ()
88 matlab_home = dirname (dirname (realpath (chomp (readstring (` which matlab` )))))
9- elseif is_apple ()
9+ elseif isapple ()
1010 default_dir = " /Applications"
1111 if isdir (default_dir)
1212 dirs = readdir (default_dir)
@@ -15,7 +15,7 @@ function matlab_home_path()
1515 matlab_home = joinpath (default_dir, maximum (dirs))
1616 end
1717 end
18- elseif is_windows ()
18+ elseif iswindows ()
1919 default_dir = Sys. WORD_SIZE == 32 ? " C:\\ Program Files (x86)\\ MATLAB" : " C:\\ Program Files\\ MATLAB"
2020 if isdir (default_dir)
2121 dirs = readdir (default_dir)
3535function matlab_lib_path ()
3636 # get path to MATLAB libraries
3737 matlab_home = matlab_home_path ()
38- matlab_lib_dir = if is_linux ()
38+ matlab_lib_dir = if islinux ()
3939 Sys. WORD_SIZE == 32 ? " glnx86" : " glnxa64"
40- elseif is_apple ()
40+ elseif isapple ()
4141 Sys. WORD_SIZE == 32 ? " maci" : " maci64"
42- elseif is_windows ()
42+ elseif iswindows ()
4343 Sys. WORD_SIZE == 32 ? " win32" : " win64"
4444 end
4545 matlab_lib_path = joinpath (matlab_home, " bin" , matlab_lib_dir)
5151
5252function matlab_startcmd ()
5353 matlab_home = matlab_home_path ()
54- if ! is_windows ()
54+ if ! iswindows ()
5555 default_startcmd = joinpath (matlab_home, " bin" , " matlab" )
5656 if ! isfile (default_startcmd)
5757 error (" The MATLAB path is invalid. Set the MATLAB_HOME evironmental variable to the MATLAB root." )
5858 end
5959 default_startcmd = " exec $(Base. shell_escape (default_startcmd)) "
60- elseif is_windows ()
60+ elseif iswindows ()
6161 default_startcmd = joinpath (matlab_home, " bin" , (Sys. WORD_SIZE == 32 ? " win32" : " win64" ), " MATLAB.exe" )
6262 if ! isfile (default_startcmd)
6363 error (" The MATLAB path is invalid. Set the MATLAB_HOME evironmental variable to the MATLAB root." )
0 commit comments