diff --git a/borghelper.sh b/borghelper.sh index a03993f..aecf914 100644 --- a/borghelper.sh +++ b/borghelper.sh @@ -134,3 +134,19 @@ if [ "$fileName" ] && [ -z "$archiveName" ]; then consoleError 1 "Filename specified without an associated archive name." fi + +### read borg information file + +# check if file was provided as a relative or absolute path +case "${varsFile}" in + /*) + # absolute path, no need to rewrite variable + . "${varsFile}" + ;; + *) + # relative path, prepend './' to create absolute path + . "./${varsFile}" + ;; +esac + +