-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Various: Scattered trivial cleanups #3016
Conversation
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
scripts/checkdeps
Outdated
get_yes_no && sudo apt-get install "${need_pkg[@]}" | ||
;; | ||
fedora|centos|rhel) | ||
if command -v dnf >/dev/null; then YUM=dnf; else YUM=yum; fi |
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.
command -v dnf >/dev/null && YUM=dnf || YUM=yum
?
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.
Looks good to me.
Other than the small nit this looks good to me, thanks. |
config/functions: pair of what I believe to be unused functions anywhere. eglibc was rolled into glibc proper a few years ago. tolower() has been around for years and just appears unused. It could be improved if it stays. |
Replace "which" with "command -v", which is part of POSIX. Make offering to install packages contingent on having the sudo command. Not every distro uses sudo. It is optional in Gentoo, for example. Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
eglibc ceased active development years ago and is no longer in tree, so no need to check for it. tolower() has been around since 2010 and is unused anywhere. Wish it well! Should it return, tr '[:upper:]' '[:lower:]' is likely better. Signed-off-by: Ian Leonard <antonlacon@gmail.com>
8d345c5
to
520391b
Compare
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
mkpkg_lockdev: drop as lockdev was dropped from tree early August. |
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
.gitignore: adding lost+found should it be on a dedicated filesystem. |
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.
Thanks!
These are some cleanup commits that have been floating around my branches. All of them are fairly trivial, so I grouped them up.
rpi: housekeeping edits comments to reflect the options available to the RPi.
projects: ratpoison removes references to the ratpoison wm from the project comments. I believe ratpoison was dropped a couple years ago from the tree.
config/options: replaces "which" with "command -v". Command -v is POSIX and has the same result as which. nproc is part of coreutils, and returns the number of processing units available, which is what the grep expression was up to.
scripts/checkdeps: which to command -v, and be more graceful when the 'sudo' command isn't present. I don't have sudo on my machines.