Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Fix long standing get_settings bug that does not honor filenames with…
Browse files Browse the repository at this point in the history
… a single quote.
  • Loading branch information
fewtarius committed Dec 29, 2023
1 parent 7d4b58a commit b559146
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jelos/profile.d/001-functions
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function get_setting() {
if [ -n "${3}" ]
then
### Test to see if we have a game setting.
VAR="$2\[\"$(echo ${3} | sed 's/\W/\\&/g')\"]\.$1"
VAR="$2\[\"$(echo ${3} | sed -E "s~'~\\\x27~g"';s~[()&]~\\&~g')\"\]\.$1"
OUTPUT=$(awk 'BEGIN {FS="="} /^'"${VAR}"'/ {print $NF}' ${J_CONF})
if [ ! -z "${OUTPUT}" ]
then
Expand Down

0 comments on commit b559146

Please sign in to comment.