Closed bleonard252 closed 7 months ago
Good idea. One minor nit to fix and I'll accept/merge.
Awesome. Thank you!
As simple and elegant as this is, it's given me some ideas on how to finally solve the issue of being able to easily swap configurations (mostly the bookmarks and associated station logos) when using the app in more than one radio market (e.g, DC and/or NYC).
This PR adds an environment variable intended for use when
nrsc5-dui
is installed somewhere immutable. A few fixes for assumptions about the runtime environment were applied. I also had it print the actual error when it failed to write the config file (as this was an issue I was having).When
NRSC5DUI_DATA
is set to a writeable, empty directory:nrsc5-dui
creates the cfg, aas, and map directoriesruntimeDir
but instead based on the directory givenWhen
NRSC5DUI_DATA
is not set:nrsc5-dui
assumes its value is theruntimeDir
and proceeds as normalIt may be beneficial to apply this as a "squash" merge.