Skip to content

Support multi-database solutions in fmparse.sh#7

Open
marcoaperez wants to merge 1 commit intopetrowsky:mainfrom
Taiko-Solutions:fix/multi-db-fmparse
Open

Support multi-database solutions in fmparse.sh#7
marcoaperez wants to merge 1 commit intopetrowsky:mainfrom
Taiko-Solutions:fix/multi-db-fmparse

Conversation

@marcoaperez
Copy link

Summary

FileMaker solutions often consist of multiple .fmp12 files (e.g., a controller, a data file, a UI file). Currently, fmparse.sh wipes the entire agent/xml_parsed/ directory on every run (rm -rf "$XML_PARSED_DIR"/*), making it impossible to work with more than one database at a time.

Since fm-xml-export-exploder already organizes parsed output into solution-named subdirectories (xml_parsed/scripts/SolutionA/, xml_parsed/tables/SolutionA/, etc.), the fix is straightforward: instead of clearing everything, only remove the subdirectories matching the current solution name.

Before:

rm -rf "$XML_PARSED_DIR"/*

After:

find "$XML_PARSED_DIR" -mindepth 2 -maxdepth 2 -type d -name "$SOLUTION_NAME" -exec rm -rf {} +

This allows multiple databases to coexist in xml_parsed/. Each Explode XML refreshes only its own database without affecting the others. fmcontext.sh already reads all of xml_parsed/, so the generated index files automatically cover all databases present.

Test plan

  • Ran Explode XML for database A — xml_parsed/*/DatabaseA/ populated correctly
  • Ran Explode XML for database B — xml_parsed/*/DatabaseB/ created alongside A
  • Verified database A subdirectories were untouched after exploding B
  • Re-ran Explode XML for database A — only A's subdirectories were refreshed, B remained intact
  • Verified fmcontext.sh generated index files covering both databases

Replace the blanket rm -rf of xml_parsed/* with a targeted find that
only removes subdirectories matching the current solution name. This
allows multiple FileMaker databases to coexist in xml_parsed/ — each
Explode XML refreshes only its own database without wiping the others.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant