summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-20 16:27:17 +0100
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-20 16:27:17 +0100
commitfaaa22877bf2317b366a5c65b6d312e5246d9a51 (patch)
tree7323d847361ce8091d41a5f2ac1b1630980d3d6e
parentef28bff69c8cac7cb7bee3431d6f9d7e8a952c36 (diff)
downloadmidipix_build-faaa22877bf2317b366a5c65b6d312e5246d9a51.tar.bz2
midipix_build-faaa22877bf2317b366a5c65b6d312e5246d9a51.tar.xz
subr/build_init.subr:buildp_init_prereqs(): print missing prerequisite package(s).
-rw-r--r--subr/build_init.subr13
1 files changed, 9 insertions, 4 deletions
diff --git a/subr/build_init.subr b/subr/build_init.subr
index 0fe59ba0..163e0c2a 100644
--- a/subr/build_init.subr
+++ b/subr/build_init.subr
@@ -160,14 +160,19 @@ buildp_init_getopts() {
};
buildp_init_prereqs() {
- local _rc=0; _status="";
- if ! which \
+ local _cmd="" _cmds_missing="" _rc=0; _status="";
+ for _cmd in \
awk bunzip2 cat chmod cp date find flock git \
grep gunzip gzip hostname install kill ln lzip \
make mkdir mkfifo mv paste patch pgrep pkill \
printf readlink rm sed seq sha256sum sort stat \
- tail tar test touch tr wget xz >/dev/null; then
- _rc=4; _status="Error: missing prerequisite package(s).";
+ tail tar test touch tr wget xz; do
+ if ! which "${_cmd}" >/dev/null; then
+ _cmds_missing="${_cmds_missing:+${_cmds_missing} }${_cmd}";
+ fi;
+ done;
+ if [ -n "${_cmds_missing}" ]; then
+ _rc=4; _status="Error: missing prerequisite package(s): ${_cmds_missing}";
elif ! awk -V 2>/dev/null | grep -q "^GNU Awk "; then
_rc=5; _status="Error: awk(1) in \$PATH must be GNU Awk.";
elif ! sed --version 2>/dev/null | grep -q "^GNU sed "; then