Skip to content

Commit 5a59c40

Browse files
authored
Update setup_matlab.py
1 parent f8112fa commit 5a59c40

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

scripts/setup_matlab.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import tempfile
1010
import argparse
1111

12-
1312
def add_matlab_to_path(matlab_version) -> bool:
1413
"""Detect default MATLAB installation path based on the platform."""
1514
system = platform.system().lower()
@@ -57,7 +56,7 @@ def add_matlab_to_path(matlab_version) -> bool:
5756
# Check path existence
5857
check_path = op.join(base, path)
5958
if op.exists(check_path):
60-
print(f"Found MATLAB Runtime at {check_path}.")
59+
print(f"{check_path}")
6160
found = True
6261
else:
6362
continue
@@ -183,10 +182,15 @@ def setup_matlab_environment(download):
183182
if __name__ == "__main__":
184183
parser = argparse.ArgumentParser(prog='setup_matlab')
185184
parser.add_argument('-d', '--download-if-not-found', dest='download', action='store_true')
185+
parser.add_argument('-p', '--print', dest='print', action='store_true')
186186
args = parser.parse_args()
187187

188-
result = setup_matlab_environment(args.download)
189-
if result:
188+
if args.print:
189+
add_matlab_to_path("R2024b")
190190
exit(0)
191-
else:
192-
exit(-1)
191+
else:
192+
result = setup_matlab_environment(args.download)
193+
if result:
194+
exit(0)
195+
else:
196+
exit(-1)

0 commit comments

Comments
 (0)