improve config file behaviour
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1 @@
|
||||
config.conf
|
||||
config.cfg
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user