Skip to content

Offer to link the launchers where sudo can see them - #5

Merged
leancode merged 1 commit into
masterfrom
installer-usr-local-bin
Sep 3, 2026
Merged

Offer to link the launchers where sudo can see them#5
leancode merged 1 commit into
masterfrom
installer-usr-local-bin

Conversation

@leancode

@leancode leancode commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Three things.

1. install.sh offers the /usr/local/bin link

sudo replaces PATH with secure_path, which excludes ~/.local/bin and includes /usr/local/bin. Linking there is what makes sudo suplemon work by name.

The installer prints the command rather than running it — nothing else in it needs a password, and prompting for one to do something optional would be worse than showing the line:

sudo ln -sf ~/.local/bin/suplemon /usr/local/bin/suplemon && sudo ln -sf ~/.local/bin/suplemon /usr/local/bin/se

Links, not copies, so re-running the installer keeps them current. A copy silently goes stale — which had already happened on my own machine.

It refuses to offer when something that is not ours holds either name. A stream editor called se exists on PyPI; replacing it without asking would be rude.

state of /usr/local/bin behaviour
empty offers the command
foreign se present ! …/se exists and is not ours; leaving it alone, no offer
ours already linked + Linked into /usr/local/bin, so sudo can find it

2. uninstall.sh detects but never removes

Same no-password reasoning. It reports the links under Left in place on purpose and prints sudo rm -f …. Verified that a dry run leaves both in place. It only names links that are actually ours.

Both scripts honour SYS_BIN_DIR for non-standard prefixes, which is also how the three cases above were tested.

3. README corrections

The sudo section now covers full path, the /usr/local/bin link, and sudoedit, in that order.

Separately, About this fork claimed upstream's last commit was January 2021. Both commits that day were Update gif url. The last change of substance was 11 December 2019, and the text now says so.

test.sh passes, both scripts parse, and twine check passes on both distributions since the README is the PyPI long description.

sudo replaces PATH with secure_path, which excludes ~/.local/bin and
includes /usr/local/bin. Linking the launcher there is what makes
'sudo suplemon' work by name rather than by full path.

install.sh prints the command instead of running it: nothing else in
the installer needs a password, and asking for one to do something
optional would be worse than showing the line. It skips the offer when
something that is not ours already holds either name, since a stream
editor called 'se' exists and replacing it silently would be rude.

Links rather than copies, so re-running the installer keeps them
current. uninstall.sh reports them and gives the removal command
without ever touching them, for the same no-password reason.

Also corrects the README on when upstream stopped. The last change of
substance was 11 December 2019; January 2021 was two edits to a README
image URL.
@leancode
leancode merged commit acfe5c5 into master Sep 3, 2026
4 checks passed
@leancode
leancode deleted the installer-usr-local-bin branch September 3, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant