Closed gcapes closed 7 months ago
It's possible for users to specify the $folder
variable on install which creates a problem.
If a user has done this, they need to set the $folder
variable when they run the script with the --purge
flag. Otherwise the script will attempt to remove the install folder from the default location. This folder won't exist and the script will generate an error.
What do you suggest for this? It's not currently feasible to grep ~/.bashrc
for the install directory, because we'd only be searching for something which ends in /links
.
I'm thinking either a check that the install directory exists before deleting, then aborting with a message if the directory doesn't exist, or adding a comment to the export PATH ...
command which the installer adds to ~/.bashrc
so it can be more easily identified.
I've implemented the first of my suggestions, and fixed some more problems encountered along the way :)
The main one is that the install script regenerates the main install directory each time it runs, even if used with the --purge
option. The simplest solution to this seemed to be to instead check for the existence of the links
directory, and purge the whole (main) directory if found, otherwise prompt the user with a warning to use the --folder
option
Fix #70.
However, the matflow installer gives an error message, detailed in #72