summaryrefslogtreecommitdiff
path: root/sfeed_update
diff options
context:
space:
mode:
Diffstat (limited to 'sfeed_update')
-rwxr-xr-xsfeed_update12
1 files changed, 7 insertions, 5 deletions
diff --git a/sfeed_update b/sfeed_update
index a7e94d5..ba9e242 100755
--- a/sfeed_update
+++ b/sfeed_update
@@ -14,18 +14,20 @@ maxjobs=8
loadconfig() {
# allow to specify config via argv[1].
if [ "$1" != "" ]; then
- # get absolute path of config file.
- config=$(readlink -f "$1" 2>/dev/null)
+ # get absolute path of config file required for including.
+ config="$1"
+ path=$(readlink -f "${config}" 2>/dev/null)
else
# default config location.
config="$HOME/.sfeed/sfeedrc"
+ path="${config}"
fi
# config is loaded here to be able to override $sfeedpath or functions.
- if [ -r "${config}" ]; then
- . "${config}"
+ if [ -r "${path}" ]; then
+ . "${path}"
else
- echo "Configuration file \"$1\" does not exist or is not readable." >&2
+ echo "Configuration file \"${config}\" cannot be read." >&2
echo "See sfeedrc.example for an example." >&2
exit 1
fi