From 88cf83cd8e6c1c7617b92235c351e93ba4b96a23 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 18 Dec 2020 19:43:51 +0100 Subject: [PATCH] assert_we_have_all_dependencies --- lib/common.sh | 7 +++++++ package_check.sh | 1 + 2 files changed, 8 insertions(+) diff --git a/lib/common.sh b/lib/common.sh index 4f40291..9d596b7 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -43,6 +43,13 @@ assert_we_are_connected_to_the_internets() { || log_critical "Unable to connect to internet." } +assert_we_have_all_dependencies() { + for dep in "lxc" "lynx" + do + which $dep 2>&1 > /dev/null || log_critical "Please install $dep" + done +} + function check_lxd_setup() { # Check lxd is installed somehow diff --git a/package_check.sh b/package_check.sh index 5d58b37..1277175 100755 --- a/package_check.sh +++ b/package_check.sh @@ -184,6 +184,7 @@ FETCH_PACKAGE_TO_TEST() { ################################### assert_we_are_connected_to_the_internets +assert_we_have_all_dependencies #self_upgrade # FIXME renenable this later fetch_or_upgrade_package_linter