Merge pull request #1598 from fewtarius/dev
Tweak get_setting for compatibility with wonky filenames.
This commit is contained in:
commit
305286470e
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ get_setting() {
|
||||||
if [ ! -z "${3}" ]
|
if [ ! -z "${3}" ]
|
||||||
then
|
then
|
||||||
### Test to see if we have a game setting.
|
### Test to see if we have a game setting.
|
||||||
VAR="$2\[\"$(echo ${3} | sed 's/[\(\)]/\\&/g')\"\]\.$1"
|
VAR="$2\[\"$(echo ${3} | sed 's/\W/\\&/g')\"]\.$1"
|
||||||
OUTPUT=$(awk 'BEGIN {FS="="} /^'"${VAR}"'/ {print $NF}' ${J_CONF})
|
OUTPUT=$(awk 'BEGIN {FS="="} /^'"${VAR}"'/ {print $NF}' ${J_CONF})
|
||||||
if [ ! -z "${OUTPUT}" ]
|
if [ ! -z "${OUTPUT}" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue