Skip to content

Commit f1eb7db

Browse files
only do fix_capitalization on first launch
1 parent a079917 commit f1eb7db

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

scripts/quakelaunch

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,8 @@ then
592592
calc_startmap=false
593593
fi
594594
# If there's an existing config (not "superconf"), make sure that
595-
# preview_readme_and_config will be false on future launches.
595+
# preview_readme_and_config and fix_capitalization will be false on future
596+
# launches.
596597
if [[ $has_conf == "true" ]]
597598
then
598599
if [[ "$preview_readme_and_config" != "false" ]]
@@ -601,6 +602,12 @@ then
601602
echo "preview_readme_and_config=false" >> "$tempconf"
602603
mv -f "$tempconf" "$conf"
603604
fi
605+
if [[ "$fix_capitalization" != "false" ]]
606+
then
607+
grep -v -- "^\s*fix_capitalization=" "$conf" > "$tempconf"
608+
echo "fix_capitalization=false" >> "$tempconf"
609+
mv -f "$tempconf" "$conf"
610+
fi
604611
fi
605612
fi
606613
# Take care of any obvious capitalization gotchas.
@@ -937,17 +944,20 @@ then
937944
source "$conf"
938945
fi
939946
# If we just created this config, clean it up a bit by removing examples
940-
# and then initialize the preview_readme_and_config value to false.
947+
# and then initialize the preview_readme_and_config and fix_capitalization
948+
# values to false.
941949
if [[ $conf_created == "true" ]]
942950
then
943951
grep -v -- "^#\*" "$conf" | grep -v -- "^\s*#\s*startmap=" | grep -v -- "^\s*#\s*maplist=" | grep -v -- "^\s*#\s*extra_quake_args=" | grep -v -- "^\s*#\s*quake_args=" | sed 'N;/^\n$/D;P;D;' > "$tempconf"
944952
echo >> "$tempconf"
945953
cat <<- EOF >> "$tempconf"
946-
# The preview_readme_and_config option is set false after initial launch so
947-
# that the readme and config editor(s) won't appear on future launches.
954+
# The options below are set false after initial launch so they won't
955+
# happen again on future launches (unless you manually set them back to
956+
# true).
948957
EOF
949958
echo >> "$tempconf"
950959
echo "preview_readme_and_config=false" >> "$tempconf"
960+
echo "fix_capitalization=false" >> "$tempconf"
951961
mv -f "$tempconf" "$conf"
952962
fi
953963
# Abandon ship now if basegame_error is still set.

0 commit comments

Comments
 (0)