mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-02-06 14:52:42 +00:00
Ubuntu started to flag which as deprecated and it seems which is not really standard and may vary across Distro. Drop the use of which and use the standard 'command -v' for this simple task. Which is still present in the prereq if some package/script still use which. A utility script called command_all.sh is implemented that will just mimic the output of which -a. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
12 lines
245 B
Bash
Executable File
12 lines
245 B
Bash
Executable File
#! /bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Reduced version of which -a using command utility
|
|
|
|
case $PATH in
|
|
(*[!:]:) PATH="$PATH:" ;;
|
|
esac
|
|
|
|
for ELEMENT in $(echo $PATH | tr ":" "\n"); do
|
|
PATH=$ELEMENT command -v "$@"
|
|
done
|