-
Notifications
You must be signed in to change notification settings - Fork 501
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
bash script #537
Comments
wget is a common GNU package. |
Are you sure?I'm not very |
Are you using Arch, right? It's in Extra Repo: https://www.archlinux.org/packages/?name=wget |
now there is no (win10), But I used it. and I don’t remember that he installed these packages by default upd upd2 and even in base-devel there are none (these are just basic build tools (packages). they may not be needed) |
I agree there's room for improvement. Pull requests are welcome :) |
I was just messing with a variant that uses It's using It could also just be added as a third-option I guess. Anyone have any thoughts on that? pinging @earthlng and @claustromaniac |
Sounds like a good idea to me. It still might be a good plan to add a check for simply aborting when even perl is missing, though. There are a gazillion distros out there and more will spawn on time, we can't possibly know for sure whether they all have/will have one of those or not. |
Good point - do you think we should keep the wget and curl options, or just switch to perl entirely? |
At just 2-3 lines per additional check I'd just keep them all :) Then again, I'm not too finicky when it comes to etiquette and saving bytes and such... 😅 Edit: readability is not my specialty either... |
just FYI: curl in ArchLinux is required by 241 packages, 1 being
I would keep it and just add perl as a last resort because you said it's slower |
Sounds good! It looks like @claustromaniac already added a check in #540, so we're good there. If curl is that widely used, the pearl option probably doesn't add a whole lot, but I can throw it in! |
Feel free to add a perl fallback but I think every system with Firefox installed will almost certainly also have curl or wget. At least so far nobody reported a problem and OP only guessed about Arch not having it. |
I am (practically) sure on 60 percent. You can check for yourself |
@bogachenko pacman is a base package and curl is a dependency of pacman |
@earthlng damn, you're right |
new version of the updater.sh is in the works so I'm closing this |
* Uses `perl` as a last resort if `curl` and `wget` are not available (fixes #537) * Aborts and notifies user if none of the above are installed * Better use of functions * When version numbers are checked, the contents are immediately saved to a temp dir. This allows us to skip using wget/curl/perl a second time * Improved messages for users * Added various font colors for ease of use and aesthetics
Hi, I have a question about your script.
https://github.com/ghacksuserjs/ghacks-user.js/blob/master/updater.sh
There are 2 mentions of two packages, wget and curl. These are packages that load something (in our case, user.js).
In this script, they are selected to choose from, because there is an "if" condition. The first package is "curl", but if it is not available (not installed or broken?), Then "wget" comes into play. However, what if there are none. ALL. NOT What then? second "if" is not there?
this is not about debian distributions (for which they are available by default), but about (say) archlinux.
On it, as far as I remember, you need to manually install it (although I could be wrong, I did not use it for a long time).
and so it is possible to supplement the conditions on the verification (presence or absence) of these packages? Is there a guru js here?
I am not a guru in js, and maybe I’ll repeat myself I don’t understand. Explain to me?
I hope I wrote without errors 😢
The text was updated successfully, but these errors were encountered: