LegendaryBibo / Steam-Big-Picture-Grub-Theme

A Grub bootloader theme designed to match the appearance of Steam Big Picture mode.
Other
48 stars 6 forks source link

Use "command -v" instead of "which" to find binaries #3

Closed rndmh3ro closed 9 years ago

rndmh3ro commented 10 years ago

Just a minor nitpick. If I run the install script without "grub2-install" installed, this is the output:

root /Steam-Big-Picture-Grub-Theme #  ./install.sh
which: no grub2-install in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/vendor_perl:/usr/bin/core_perl)

If you use command -v grub2-install, the output is empty and no error message is created.

LegendaryBibo commented 10 years ago

I didn't write that part of the install script, but anyways if I use command -v grub2-install on my system which has grub2 I get an empty string.

archshift commented 10 years ago

Could it just be redirected to /dev/null?

zekesonxx commented 10 years ago

I might be wrong but isn't the entire point of the which to check if you have the command, even though you don't?

LegendaryBibo commented 10 years ago

Yeah so due to how Grub gets package between distros, which is used to see if the grub mkconfig command can be run in the terminal, and different distros named it different things. This just checks that it can be run in the terminal and that it's a certain version number.