Open umbeebmu opened 5 years ago
maybe I undertand what is the issue admin rights are needed to access /usr/local/share, but running the script as: sudo ./setup_custom_fortunes.sh then the test in the script to check if fortune is already installed did not work, so the condition had been reverted.
@umbeebmu I've merged a fix that should resolve this concern. Can you please pull from master again and confirm? See #20
Hi @laurendc thanks for the fix, it improves the situation but it does not fix it completely. in my environment a regular user cannot write into /usr/local/share, and running the script as an admin (using sudo) fails because by default the admin account does not have /usr/games in the $PATH. We could remove the check for the presence of fortune from the script, or I'm still looking for a way to have the check for the presence of 'fortune' working also for root. one option would be to hardcode the path to /usr/games/fortune for linux systems, but let's see if I can find a better way
Just updating here - currently looking into updating how we are checking for the installation of fortune. It would be best to leave the check in there. So the options are to:
$ uname -a Linux Celsius 5.3.0-19-generic #20-Ubuntu SMP Fri Oct 18 09:04:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux $ ./setup_custom_fortunes.sh /usr/games/fortune Fortune is not installed. Please install fortune. $ which fortune /usr/games/fortune $if command -v fortune; then echo true; else echo false; fi /usr/games/fortune true $ fortune Give your very best today. Heaven knows it's little enough.