From 3071fe251dcf9f628866a62514a7c14395aceffa Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Sun, 2 Jul 2017 12:17:08 +0000 Subject: [PATCH] Fix function "dependencies_check" --- functions/dependencies_check.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/functions/dependencies_check.sh b/functions/dependencies_check.sh index 677f374..541af9b 100644 --- a/functions/dependencies_check.sh +++ b/functions/dependencies_check.sh @@ -5,19 +5,15 @@ # a : and the name of a package if the package on a Debian-ish system is not # named for the tool (i.e., qemu-user-static). dependencies_check() { - local depfile deps missing + local missing - for depfile in "$@"; do - if [[ -e "$depfile" ]]; then - deps="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < ${BASE_DIR}/depends)" - fi - - for dep in $deps; do + if [[ -f "$1" ]]; then + for dep in $(cat "$1"); do if ! hash ${dep%:*} 2>/dev/null; then missing="${missing:+$missing }${dep#*:}" fi done - done + fi if [[ "$missing" ]]; then echo "Reqired dependencies not installed"