Skip to content

Commit f3d45b9

Browse files
committed
cleaner script
1 parent 4819a35 commit f3d45b9

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

scripts/MatlabReleaseUpgrade.m

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
disp(matlabRelease())
22

3-
assert(isMATLABReleaseOlderThan('R2025a'), "Matlab R2025a changed the upgrade process, use the GUI.")
4-
53
r = fullfile(matlabroot, "bin", computer("arch"));
4+
mustBeFolder(r)
5+
66
cmd = fullfile(r, "MathWorksUpdateInstaller");
77
if ispc()
88
cmd = cmd + ".exe";
99
end
1010

11-
assert(isfile(cmd), "MathWorks Update Installer not found at %s", cmd)
11+
if ~isfile(cmd)
12+
if isMATLABReleaseOlderThan('R2025a')
13+
error("Did not find upgrade program at %s", cmd)
14+
else
15+
error("Matlab R2025a changed the upgrade process, use the GUI.")
16+
end
17+
end
1218

13-
fprintf("Run this command in Terminal to check for Matlab upgrade:\n\n%s\n\n", cmd)
19+
fprintf("Run this command in system Terminal to check for Matlab upgrade:\n\n%s\n\n", cmd)

0 commit comments

Comments
 (0)