treewide: replace `which` with `command -v`
authorPaul Spooren <mail@aparcar.org>
Mon, 10 Aug 2020 01:33:37 +0000 (15:33 -1000)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 12 Aug 2020 09:08:05 +0000 (11:08 +0200)
commit1fdf6b745cc3d85be3743837817a360121554134
tree6396426c1b63ceb0b21c486a3158ded303eebe3e
parent4165232c45df224f32a94f43b9938d13d643b2a8
treewide: replace `which` with `command -v`

Fix shellcheck SC2230
> which is non-standard. Use builtin 'command -v' instead.

Using `command -v` is POSIX compliant while `which` is not.  Also to
mention, `command -v` is a shell builtin whereas `which` is a separate
busybox applet.

Once applied to everything concerning OpenWrt we can disable the busybox
feature `which` and save 3.8kB.

Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Paul Spooren <mail@aparcar.org>
[also replace cases in zram-swap]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
include/rootfs.mk
package/base-files/files/lib/upgrade/stage2
package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
package/system/zram-swap/files/zram.init
scripts/ipkg-build