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

Various: Scattered trivial cleanups #3016

Merged
merged 7 commits into from
Oct 17, 2018

Conversation

antonlacon
Copy link
Contributor

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.

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
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
Copy link
Contributor

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@MilhouseVH
Copy link
Contributor

Other than the small nit this looks good to me, thanks.

@antonlacon
Copy link
Contributor Author

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>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
@antonlacon
Copy link
Contributor Author

mkpkg_lockdev: drop as lockdev was dropped from tree early August.

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
@antonlacon
Copy link
Contributor Author

.gitignore: adding lost+found should it be on a dedicated filesystem.

Copy link
Contributor

@MilhouseVH MilhouseVH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MilhouseVH MilhouseVH merged commit f4dff4c into LibreELEC:master Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants