Improve runner script: exit codes

Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
2022-07-24 22:24:42 +02:00
parent b7e9056b81
commit 21d449a0a9
3 changed files with 34 additions and 16 deletions

View File

@@ -1,11 +0,0 @@
# library for work with config file
# check directories if they exist
[ -d $CONFIG_DIR ] || die "Config directory does not exist on volune - $CONFIG_DIR"
[ -f $CONFIG_DIR/cloner.cfg ] || die "Config file does not exist - create please cloner.cfg"
# load config files
source $CONFIG_DIR/cloner.cfg
# check if the url is specified
repo=${cloner_repo_url:-}
[ -z "$repo" ] && die "No repository url is specified" || true

View File

@@ -5,7 +5,7 @@ IFS=$'\n\t'
# source libs
mydir=$(dirname $(realpath $0))
source $mydir/cloner-lib-cfg
source $mydir/detector-lib-cfg