mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
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:
@@ -7,7 +7,7 @@
|
||||
+: ${ZGREP:=zgrep}
|
||||
+: ${GUNZIP:=gunzip}
|
||||
+
|
||||
+if [ -z $(which $ZGREP) ] && ! [ -z $(which $GUNZIP) ] && [ -x $(which $GUNZIP) ] && [ -f $CONFIG ] && [ "$CONFIG" == "/proc/config.gz" ] ; then
|
||||
+if [ -z $(command -v $ZGREP) ] && ! [ -z $(command -v $GUNZIP) ] && [ -x $(command -v $GUNZIP) ] && [ -f $CONFIG ] && [ "$CONFIG" == "/proc/config.gz" ] ; then
|
||||
+
|
||||
+ CONFIG_NEW="/tmp/config-$(uname -r)"
|
||||
+ $GUNZIP -c $CONFIG > $CONFIG_NEW
|
||||
|
||||
Reference in New Issue
Block a user