Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically run matching program when renamed or symlinked #2

Closed
Phantop opened this issue Mar 28, 2021 · 3 comments
Closed

Automatically run matching program when renamed or symlinked #2

Phantop opened this issue Mar 28, 2021 · 3 comments

Comments

@Phantop
Copy link
Contributor

Phantop commented Mar 28, 2021

This is a feature request based on what busybox does when linked to the filename of any of its applets. Would be really neat and useful for Conty to support something like that considering all the programs included within it.

So, if I made a link to conty.sh called wine, then the version of Wine included within should run.

@Kron4ek
Copy link
Owner

Kron4ek commented Mar 28, 2021

Good idea, will try to implement this.

@frostworx
Copy link
Contributor

Nice idea, but IMHO the symlinks should not conflict with the real programs in $PATH, so a user defined destination directory for the symlinks would make sense.

To manually create symlinks for all built in programs (here in $PWD) you could simply do:

while read -r line; do ln -s ./conty.sh "$line";done <<< "$(./conty.sh ls -1 /usr/bin)"

@Kron4ek
Copy link
Owner

Kron4ek commented Mar 28, 2021

Implemented. Also added AUTOSTART and AUTOARGS variables. AUTOSTART variable has a higher priority than a symlink name, if they are used together.

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

No branches or pull requests

3 participants