treewide: replace which with command -v

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

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

Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
Paul Spooren
2020-08-09 13:42:09 -10:00
parent 03253c2309
commit c4a4e43e2e
5 changed files with 20 additions and 20 deletions

View File

@@ -4,7 +4,7 @@ PATTERN=$1
SCM=
[ -d .svn ] && SCM="svn"
git=$( which git 2>/dev/null )
git=$( command -v git 2>/dev/null )
[ "$git" ] && "$git" status >/dev/null && SCM="git"
[ -z "$SCM" ] && {