The script currently stores the configuration data in the directory from where it executes. This means that separate runs on the same machine from different directories register a different machine. We can default to $HOME and provide a fallback to the current directory if $HOME is not defined.
We will need to provide a fallback mechanism so that we don't break user's who have been running the script from the same directory. A possible workflow is
- Attempt to read config data from home directory
- Attempt to read config data from current directory
- Run script
- Save config data to home directory
- Save config data to current directory if previous step failed
This leaves old config data in the current directory, but ensures that the data is copied over.
The script currently stores the configuration data in the directory from where it executes. This means that separate runs on the same machine from different directories register a different machine. We can default to
$HOMEand provide a fallback to the current directory if$HOMEis not defined.We will need to provide a fallback mechanism so that we don't break user's who have been running the script from the same directory. A possible workflow is
This leaves old config data in the current directory, but ensures that the data is copied over.