From c8d1ff600fba3a1578e34a1347f24a70388be977 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 12 Oct 2017 19:27:22 +0100 Subject: fail if an import is not possible --- src/backend/libvasile.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/backend/libvasile.sh b/src/backend/libvasile.sh index 79a46ab..506ee5e 100644 --- a/src/backend/libvasile.sh +++ b/src/backend/libvasile.sh @@ -3,42 +3,48 @@ if [[ -f /lib/gentoo/functions.sh ]] ; then source /lib/gentoo/functions.sh else - echo "I won't do that without sys-apps/gentoo-functions" + echo "Cannot import Gentoo functions, I will abort now!" exit 1 fi if [[ -f /usr/lib/vasile/variables_jail.sh ]] ; then source /usr/lib/vasile/variables_jail.sh else - source variables_jail.sh + echo "Cannot import jail variables, I will abort now!" + exit 1 fi if [[ -f /usr/lib/vasile/commands_jail.sh ]] ; then source /usr/lib/vasile/commands_jail.sh else - source commands_jail.sh + echo "Cannot import jail commands, I will abort now!" + exit 1 fi -if [[ -f /usr/lib/vasile/gfunctions_generic.sh ]] ; then +if [[ -f /usr/lib/vasile/functions_generic.sh ]] ; then source /usr/lib/vasile/functions_generic.sh else - source functions_generic.sh + echo "Cannot import generic functions, I will abort now!" + exit 1 fi if [[ -f /usr/lib/vasile/functions_makepkg.sh ]] ; then source /usr/lib/vasile/functions_makepkg.sh else - source functions_makepkg.sh + echo "Cannot import makepkg functions, I will abort now!" + exit 1 fi if [[ -f /usr/lib/vasile/functions_makeiso.sh ]] ; then source /usr/lib/vasile/functions_makeiso.sh else - source functions_makeiso.sh + echo "Cannot import makeiso functions, I will abort now!" + exit 1 fi if [[ -f /usr/lib/vasile/functions_modeswitch.sh ]] ; then source /usr/lib/vasile/functions_modeswitch.sh else - source functions_modeswitch.sh + echo "Cannot import modeswitch functions, I will abort now!" + exit 1 fi -- cgit v1.2.3