Commit bbcd203e authored by Cristian Weiland's avatar Cristian Weiland

Merge branch 'issue/69' into 'develop'

Issue #69: checking if the file 'config.sh' exists before trying to use it.

See merge request !37
parents 5c4f1aa8 5b851a63
......@@ -49,7 +49,12 @@
month="0$month"
fi
source ./config.sh
if [ -e config.sh ]; then
source ./config.sh
else
echo " The file 'config.sh' does not exist in this directory, exiting program."
exit
fi
# Check if all variables in config file are set:
configFile='scripts/expenses/config.sh'
......
......@@ -48,7 +48,12 @@ if [[ "${#month}" -eq "1" ]]; then
month="0$month"
fi
source ./config.sh
if [ -e config.sh ]; then
source ./config.sh
else
echo " The file 'config.sh' does not exist in this directory, exiting program."
exit
fi
# Check if all variables in config file are set:
configFile='scripts/travel_allowance/config.sh'
......
......@@ -52,7 +52,12 @@ if [[ "${#month}" -eq "1" ]]; then
month="0$month"
fi
source ./config.sh
if [ -e config.sh ]; then
source ./config.sh
else
echo " The file 'config.sh' does not exist in this directory, exiting program."
exit
fi
configFile='scripts/workers/config.sh'
if [ -z "${index}" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment