16 lines
257 B
Bash
16 lines
257 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
touch config.json
|
||
|
cat >./config.json <<EOF
|
||
|
$CONFIGJSON
|
||
|
EOF
|
||
|
if [ ! -s config.json ]; then
|
||
|
echo "no config found"
|
||
|
exit 1
|
||
|
fi
|
||
|
if [[ -z $(grep '[^[:space:]]' "config.json") ]] ; then
|
||
|
echo "no config in file"
|
||
|
rm config.json
|
||
|
exit 1
|
||
|
fi
|