-
Notifications
You must be signed in to change notification settings - Fork 45
/
install.wls
executable file
·44 lines (36 loc) · 1.12 KB
/
install.wls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env wolframscript
Check[
Get[FileNameJoin[{DirectoryName[$InputFileName], "DevUtils", "init.m"}]];
Off[General::stop];
,
Print["Message occurred during loading of DevUtils. Build failed."];
Exit[1];
];
Check[
InstallGitLink[];
buildResult = BuildLibSetReplace["Verbose" -> True];
If[!AssociationQ[buildResult], Exit[1]];
packResult = PackSetReplace["Verbose" -> True];
pacletLocation = packResult["Location"];
If[!StringQ[pacletLocation], Exit[1]];
previousPaclets = PacletFind["SetReplace"];
If[previousPaclets =!= {},
Print["Uninstalling previous SetReplace at ", First[previousPaclets]["Location"]];
If[FailureQ[PacletUninstall["SetReplace"]],
Print["Could not uninstall old paclet."];
Exit[1];
];
];
Print["Installing paclet at ", pacletLocation];
installedPaclet = PacletInstall[pacletLocation];
If[FailureQ[installedPaclet],
Print["Could not install new paclet."];
Exit[1];
];
Print["Paclet installed to ", installedPaclet["Location"]];
,
Print["Message occurred during installing. Install failed."];
Exit[1];
];
Print["Install succeeded."];
Exit[0];