-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Determine compatibility by package manager #16
Conversation
Thank you for this. I think you're right, using the package manager to determine is probably a good path rather than using the current method, thanks. Just one minor edit needed. |
Syntax error corrected. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found one minor issue when running this PR on Solus (eopkg
). With the suggestion applied it works beautifully, thanks!
case $CANDIDATE in | ||
Ubuntu|LinuxMint|Pop|elementary|Zorin) | ||
DISTRO="$CANDIDATE" | ||
PACKAGEMGR=$(command -v {apt,pacman} | sed "s/.*\///") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be:
PACKAGEMGR=$(command -v {apt,pacman} | sed "s/.*\///") | |
PACKAGEMGR=$(command -v {apt,pacman,zypper,dnf,yum,eopkg} | sed "s/.*\///") |
@popey: would you be interested in me picking up this changeset in a new PR? |
Heya! Thanks for the ping. I haven't been looking at this for a while, but I'm hoping to get some time to clean up this repo shortly. Sorry for the lack of responses. |
Hey! Found this tool in this Hacker News post and thought I might check it out.
To summarize, this pull request seeks to accomplish the following things:
unsnap
script distro-agnostic by determining what package manager the system uses by defaultInstead of determining if the script is compatible based upon what distro is being used, why not just find out if the system can successfully run the script? That way any distro can be used as long as support for the package manager (and their specific nuances) is there.
Included is the required code to generate scripts for the following package managers:
apt
pacman
yum
dnf
zypper
eopkg
This will fix the following issues (and more to come):
I have tested my changes on Arch Linux and everything seems to be in working order.