read configuration file

This commit is contained in:
Asif Bacchus 2020-03-26 02:47:52 -06:00
parent 13bb16bfda
commit 4d1b3a2a65
1 changed files with 16 additions and 0 deletions

View File

@ -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