Factoring
This commit is contained in:
parent
5073d18727
commit
7f3d7e5158
|
@ -1,16 +1,14 @@
|
||||||
#/bin/sh
|
#/bin/sh
|
||||||
|
|
||||||
check_bin_in_path() {
|
check_bin_in_path() {
|
||||||
if [ -z $(which $1 2>/dev/null) ]; then
|
for bin in $1; do
|
||||||
MISSING="${MISSING} $1"
|
if [ -z $(which ${bin} 2>/dev/null) ]; then
|
||||||
fi
|
MISSING="${MISSING} ${bin}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
check_bin_in_path eix-sync
|
check_bin_in_path "eix-sync emerge grep echo cat lsof awk sort"
|
||||||
check_bin_in_path emerge
|
check_bin_in_path "restart-services sendmail rm"
|
||||||
check_bin_in_path grep
|
|
||||||
check_bin_in_path cat
|
|
||||||
check_bin_in_path restart-services
|
|
||||||
check_bin_in_path sendmail
|
|
||||||
|
|
||||||
printf "You’r missing this:${MISSING}\n"
|
printf "You’r missing this:${MISSING}\n"
|
||||||
|
|
Loading…
Reference in a new issue