From cef91e3dac32f845e32d4ade047853c6101dd78e Mon Sep 17 00:00:00 2001 From: "Paul Buetow (mars.fritz.box)" Date: Sun, 16 Feb 2014 12:34:22 +0100 Subject: add error handling --- src/photoalbum.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/photoalbum.sh b/src/photoalbum.sh index 9db5eb9..dc536b6 100755 --- a/src/photoalbum.sh +++ b/src/photoalbum.sh @@ -13,6 +13,11 @@ if [ -z "${RC}" ]; then RC="${DEFAULTRC}" fi +if [ ! -f "${RC}" ]; then + echo "Error: Can not find config file ${RC}" >&2 + exit 1 +fi + usage() { cat - <&2 Usage: -- cgit v1.2.3