chuck-flowers / humble-lumpia

A script for managing installations of Glorious Eggroll's custom proton build
GNU General Public License v3.0
14 stars 2 forks source link

I'd remove requirement for root #3

Closed frostworx closed 3 years ago

frostworx commented 3 years ago

Hi there! Nice tool, good work - always glad to see useful bash scripts! :)

Just a thought: I've seen that downloading the "cache file" requires root privileges. If you changed the destination path to "$HOME" this wouldn't be necessary. This would also have the benefit, that getAllReleasesData could download it itself, by calling updateReleaseData if it is not found. Happy coding!

(btw I have a similar functionality in my steamtinkerlaunch, maybe you want to contribute?)

chuck-flowers commented 3 years ago

Hey thanks for the suggestion.

I initially modeled this script after the apt scripts in regards to where to store files since that's the only other "installation" utility I've had any experience using.

I'm trying to make sure my script follows Linux conventions as far as installation location and file storage. In your pull request I noticed that you are using $HOME/.cache as the storage location. I've seen other tools use $HOME/.local/bin as a user specific version of /usr/local/bin. Would it be more conventional to use $HOME/.cache or something like $HOME/.local/var as a the location for the releases file? I'm relatively new to Linux application/script development so if you have any resources you can point to that explains these conventions I'd appreciate it.

I was unaware of your project and will definitely check it out!

frostworx commented 3 years ago

Hi there, IMHO the best way to go would be to follow the XDG standard and use $XDG_CACHE_HOME and (to be on the safe side) fall back to $HOME/.cache See: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html https://specifications.freedesktop.org/basedir-spec/0.6/ar01s03.html (shorter) https://wiki.archlinux.org/title/XDG_Base_Directory (Arch always has good wikis)

frostworx commented 3 years ago

Just updated the PR to follow the XDG standard :)

chuck-flowers commented 3 years ago

This issue has been addressed by PR #4

Thank you for your contribution and the information that you've provided.