Problem
cli/bash/commands/basectl/subcommands/update_profile.sh imports file/lib_file.sh but still carries local section-content comparison and manual temp-file cleanup around behavior that is close to the shared file helper surface.
Examples:
base_update_profile_update_file_needs_change creates current and desired temp files, compares them, and manually removes them.
- Profile config writes still use ad hoc target-temp handling.
Scope
- Reuse existing
base-bash-libs file/temp helpers where they already cover the behavior.
- If a very small helper is missing from
file/lib_file.sh, define the companion base-bash-libs change before replacing Base code.
- Preserve
basectl update-profile, --remove, --defaults, and dry-run behavior.
Acceptance Criteria
update_profile.sh has less local temp/section-comparison plumbing.
- Managed shell profile updates remain stable.
- Focused update-profile tests and ShellCheck pass.
Problem
cli/bash/commands/basectl/subcommands/update_profile.shimportsfile/lib_file.shbut still carries local section-content comparison and manual temp-file cleanup around behavior that is close to the shared file helper surface.Examples:
base_update_profile_update_file_needs_changecreates current and desired temp files, compares them, and manually removes them.Scope
base-bash-libsfile/temp helpers where they already cover the behavior.file/lib_file.sh, define the companionbase-bash-libschange before replacing Base code.basectl update-profile,--remove,--defaults, and dry-run behavior.Acceptance Criteria
update_profile.shhas less local temp/section-comparison plumbing.