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)
|
cd $(dirname $0)
|
||||||
|
|
||||||
DIR="$(grep ^DIR config.conf | awk -F= '{ print $2 }')"
|
# Test if config.cfg exists and set needed variables
|
||||||
EXPORT="$(grep ^EXPORT config.conf | awk -F= '{ print $2 }')"
|
if [ ! -e config.cfg ]; then echo "Missing config.cfg file. Edit and rename config.cfg.sample"; exit 1; fi
|
||||||
DESC="$(grep ^DESC config.conf | awk -F= '{ print $2 }')"
|
source config.cfg
|
||||||
|
|
||||||
echo "$DESC" > $EXPORT
|
echo "$DESC" > $EXPORT
|
||||||
echo "" >> $EXPORT
|
echo "" >> $EXPORT
|
||||||
|
|||||||
Reference in New Issue
Block a user