Merge pull request #423 from outis1one/claude/wolf-pair-port-conflict-7nz8qg

wolf: fix TI-99/4A ES-DE command line never actually updating on re-run
This commit is contained in:
Outis
2026-09-02 15:38:02 -04:00
committed by GitHub
+23 -13
View File
@@ -966,12 +966,22 @@ UDEV
if [[ "$_GET_TI99" =~ ^[Yy]$ ]]; then if [[ "$_GET_TI99" =~ ^[Yy]$ ]]; then
mkdir -p "$GAME_STORAGE_DIR/esde-custom-systems" "$GAME_STORAGE_DIR/roms/ti994a" mkdir -p "$GAME_STORAGE_DIR/esde-custom-systems" "$GAME_STORAGE_DIR/roms/ti994a"
local _TI99_XML="$GAME_STORAGE_DIR/esde-custom-systems/es_systems.xml" local _TI99_XML="$GAME_STORAGE_DIR/esde-custom-systems/es_systems.xml"
if [ ! -f "$_TI99_XML" ] || ! grep -q '<name>ti994a</name>' "$_TI99_XML" 2>/dev/null; then backup_if_exists "$_TI99_XML"
backup_if_exists "$_TI99_XML" # Always strip and re-add the ti994a block rather than "skip if
[ -f "$_TI99_XML" ] || echo '<systemList>' > "$_TI99_XML" # already present" — confirmed live: that check left a stale
sed -i 's#</systemList>##' "$_TI99_XML" 2>/dev/null # <command> line in place across a real fix to it, since existing
cat >> "$_TI99_XML" << 'XMLEOF' # was already "present" and the check never looked at whether its
<system> # content matched the current template.
python3 - "$_TI99_XML" << 'TI99XMLPY'
import re, sys
path = sys.argv[1]
try:
with open(path) as f:
content = f.read()
except FileNotFoundError:
content = '<systemList>\n</systemList>\n'
content = re.sub(r'[ \t]*<system>\s*<name>ti994a</name>.*?</system>\s*\n?', '', content, flags=re.DOTALL)
block = ''' <system>
<name>ti994a</name> <name>ti994a</name>
<fullname>Texas Instruments TI-99/4A</fullname> <fullname>Texas Instruments TI-99/4A</fullname>
<path>%ROMPATH%/ti994a</path> <path>%ROMPATH%/ti994a</path>
@@ -980,13 +990,13 @@ UDEV
<platform>ti99</platform> <platform>ti99</platform>
<theme>ti99</theme> <theme>ti99</theme>
</system> </system>
</systemList> '''
XMLEOF content = content.replace('</systemList>', block + '</systemList>')
chown "$ACTUAL_USER:$ACTUAL_USER" "$_TI99_XML" with open(path, 'w') as f:
log_success "TI-99/4A added as an ES-DE system (roms/ti994a/, custom_systems/es_systems.xml)" f.write(content)
else TI99XMLPY
log_info "TI-99/4A system definition already present — left as-is." chown "$ACTUAL_USER:$ACTUAL_USER" "$_TI99_XML"
fi log_success "TI-99/4A ES-DE system definition written/refreshed (roms/ti994a/, custom_systems/es_systems.xml)"
echo "" echo ""
if [ ! -x "$GAME_STORAGE_DIR/emulators/ti99sim-sdl" ]; then if [ ! -x "$GAME_STORAGE_DIR/emulators/ti99sim-sdl" ]; then
# Build inside a container running the EXACT SAME image ES-DE # Build inside a container running the EXACT SAME image ES-DE