Nuzair46 / BlockTheSpot-Mac

Spotify Ad blocker for MacOS
GNU General Public License v3.0
1.35k stars 82 forks source link

add flag for custom app path #48

Closed willemml closed 1 year ago

willemml commented 1 year ago

I wanted to use this while having nix home-manager manager my Spotify install, this means that Spotify is not installed in the usual location.

This PR simply adds a flag -a that allows a user to specify the path of the Spotify app.

jetfir3 commented 1 year ago

@willemml we have this option in the Linux version -- I would prefer the flags to match in both repos. An uppercase -P flag is used to set PATH. Keeping lowercase -a open for potential future features is ideal. https://github.com/SpotX-CLI/SpotX-Linux/blob/main/install.sh#L25

getopts options and PATH_FLAG var should be inserted in alphabetical order.

readme instructions could be: -P Path to Spotify.app -- set custom Spotify app path

otherwise.. implementation itself looks great and thanks for contributing!

willemml commented 1 year ago

Thanks for the feedback! I'm working on the implementation for the uninstall script, should I add a flag getopt loop to it as well?

jetfir3 commented 1 year ago

should I add a flag getopt loop to it as well?

Would this be to loop around instead of exiting if unknown/incorrect flag is used.. or?

willemml commented 1 year ago

I just looked at the Linux uninstall script and it would be exactly the same thing (looping through each flag).

jetfir3 commented 1 year ago

I just looked at the Linux uninstall script and it would be exactly the same thing (looping through each flag).

Ahh, for the uninstall script... I misunderstood. Yes, that'd be perfect.

jetfir3 commented 1 year ago

Looks good.