improve config file behaviour

This commit is contained in:
2014-11-28 14:54:34 +01:00
parent ca8c17cf09
commit 5df5f6fcd0
3 changed files with 4 additions and 4 deletions

2
.gitignore vendored
View File

@@ -1 +1 @@
config.conf
config.cfg

View File

@@ -2,9 +2,9 @@
cd $(dirname $0)
DIR="$(grep ^DIR config.conf | awk -F= '{ print $2 }')"
EXPORT="$(grep ^EXPORT config.conf | awk -F= '{ print $2 }')"
DESC="$(grep ^DESC config.conf | awk -F= '{ print $2 }')"
# Test if config.cfg exists and set needed variables
if [ ! -e config.cfg ]; then echo "Missing config.cfg file. Edit and rename config.cfg.sample"; exit 1; fi
source config.cfg
echo "$DESC" > $EXPORT
echo "" >> $EXPORT