Support multi-database solutions in fmparse.sh#7
Open
marcoaperez wants to merge 1 commit intopetrowsky:mainfrom
Open
Support multi-database solutions in fmparse.sh#7marcoaperez wants to merge 1 commit intopetrowsky:mainfrom
marcoaperez wants to merge 1 commit intopetrowsky:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FileMaker solutions often consist of multiple .fmp12 files (e.g., a controller, a data file, a UI file). Currently,
fmparse.shwipes the entireagent/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-exploderalready 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:
After:
This allows multiple databases to coexist in
xml_parsed/. Each Explode XML refreshes only its own database without affecting the others.fmcontext.shalready reads all ofxml_parsed/, so the generated index files automatically cover all databases present.Test plan
xml_parsed/*/DatabaseA/populated correctlyxml_parsed/*/DatabaseB/created alongside Afmcontext.shgenerated index files covering both databases