mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 23:05:08 +00:00
* chore: update contributors [skip ci] * Add dry-run support across destructive commands Implement dry-run for uninstall, purge, installer, touchid, completion, and remove flows.\nGuard side effects in uninstall path (launchctl, defaults writes, kill/brew actions), update help/README, and add coverage in CLI/Bats tests.\n\nValidation: ./scripts/check.sh and ./scripts/test.sh (452 tests, 0 failures, 8 skipped). * test(purge): keep dev-compatible purge coverage --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tw93 <hitw93@gmail.com>
65 lines
2.1 KiB
Bash
65 lines
2.1 KiB
Bash
#!/bin/bash
|
|
|
|
show_clean_help() {
|
|
echo "Usage: mo clean [OPTIONS]"
|
|
echo ""
|
|
echo "Clean up disk space by removing caches, logs, and temporary files."
|
|
echo ""
|
|
echo "Options:"
|
|
echo " --dry-run, -n Preview cleanup without making changes"
|
|
echo " --whitelist Manage protected paths"
|
|
echo " --debug Show detailed operation logs"
|
|
echo " -h, --help Show this help message"
|
|
}
|
|
|
|
show_installer_help() {
|
|
echo "Usage: mo installer [OPTIONS]"
|
|
echo ""
|
|
echo "Find and remove installer files (.dmg, .pkg, .iso, .xip, .zip)."
|
|
echo ""
|
|
echo "Options:"
|
|
echo " --dry-run Preview installer cleanup without making changes"
|
|
echo " --debug Show detailed operation logs"
|
|
echo " -h, --help Show this help message"
|
|
}
|
|
|
|
show_optimize_help() {
|
|
echo "Usage: mo optimize [OPTIONS]"
|
|
echo ""
|
|
echo "Check and maintain system health, apply optimizations."
|
|
echo ""
|
|
echo "Options:"
|
|
echo " --dry-run Preview optimization without making changes"
|
|
echo " --whitelist Manage protected items"
|
|
echo " --debug Show detailed operation logs"
|
|
echo " -h, --help Show this help message"
|
|
}
|
|
|
|
show_touchid_help() {
|
|
echo "Usage: mo touchid [COMMAND]"
|
|
echo ""
|
|
echo "Configure Touch ID for sudo authentication."
|
|
echo ""
|
|
echo "Commands:"
|
|
echo " enable Enable Touch ID for sudo"
|
|
echo " disable Disable Touch ID for sudo"
|
|
echo " status Show current Touch ID status"
|
|
echo ""
|
|
echo "Options:"
|
|
echo " --dry-run Preview Touch ID changes without modifying sudo config"
|
|
echo " -h, --help Show this help message"
|
|
echo ""
|
|
echo "If no command is provided, an interactive menu is shown."
|
|
}
|
|
|
|
show_uninstall_help() {
|
|
echo "Usage: mo uninstall [OPTIONS]"
|
|
echo ""
|
|
echo "Interactively remove applications and their leftover files."
|
|
echo ""
|
|
echo "Options:"
|
|
echo " --dry-run Preview app uninstallation without making changes"
|
|
echo " --debug Show detailed operation logs"
|
|
echo " -h, --help Show this help message"
|
|
}
|