Skip to content

Commit

Permalink
Changed web installer and updateToolbox to remove old toolbox version
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand committed Jan 19, 2015
1 parent 6e99b8f commit fca0779
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Toolbox/Util.m
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@
Print["Download Complete!"];

(* Extract Archive *)
newDirectory=FileNameJoin[{directory,"MASS-Toolbox-"<>version}];
Quiet@DeleteFile[FileNameJoin[{directory,"pax_global_header"}]];
Quiet@DeleteDirectory[newDirectory,DeleteContents->True];
Print["Please wait. Extracting Files..."];
task2=ExtractArchive[fileName,directory];
WaitAsynchronousTask[task2];
Expand All @@ -206,7 +209,6 @@
If[OptionValue[Install]==True,
Module[{installNotebook,nb,cell},
Print["Installing Toolbox..."];
newDirectory=FileNameJoin[{directory,"MASS-Toolbox-"<>version}];
installNotebook=FileNameJoin[{newDirectory,"Installer.nb"}];
nb=NotebookOpen[installNotebook,Visible->False];
SelectionMove[nb,Next,Cell,3];
Expand Down
3 changes: 2 additions & 1 deletion WebInstall.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@
Print["Download Complete!"];

(* Extract files *)
newDirectory=FileNameJoin[{directory,"MASS-Toolbox-"<>version}];
Quiet@DeleteFile[FileNameJoin[{directory,"pax_global_header"}]];
Quiet@DeleteDirectory[newDirectory,DeleteContents->True];
Print["Please wait. Extracting Files..."];
task2=ExtractArchive[fileName,directory];
WaitAsynchronousTask[task2];

(* Install new Toolbox *)
Print["Installing Toolbox..."];
newDirectory=FileNameJoin[{directory,"MASS-Toolbox-"<>version}];
installNotebook=FileNameJoin[{newDirectory,"Installer.nb"}];
nb=NotebookOpen[installNotebook,Visible->False];
SelectionMove[nb,Next,Cell,3];
Expand Down

0 comments on commit fca0779

Please sign in to comment.