mirror of
https://github.com/tw93/Mole.git
synced 2026-02-14 21:40:05 +00:00
Support debug
This commit is contained in:
50
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
50
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
name: Bug Report
|
||||||
|
about: Report a bug or issue with Mole
|
||||||
|
title: '[BUG] '
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
## Describe the bug
|
||||||
|
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
## Steps to reproduce
|
||||||
|
|
||||||
|
1. Run command: `mo ...`
|
||||||
|
2. ...
|
||||||
|
3. See error
|
||||||
|
|
||||||
|
## Expected behavior
|
||||||
|
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
## Debug logs
|
||||||
|
|
||||||
|
Please run the command with `--debug` flag and paste the output here:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mo <command> --debug
|
||||||
|
# Example: mo clean --debug or mo clean --dry-run --debug
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Debug output</summary>
|
||||||
|
|
||||||
|
```text
|
||||||
|
Paste the debug output here
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
- Mole version: (run `mo --version`)
|
||||||
|
- macOS version: (run `sw_vers`)
|
||||||
|
- Installation method: (Homebrew / curl script)
|
||||||
|
- Architecture: (Intel / Apple Silicon)
|
||||||
|
|
||||||
|
## Additional context
|
||||||
|
|
||||||
|
Add any other context about the problem here, such as screenshots or related issues.
|
||||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
blank_issues_enabled: true
|
||||||
|
contact_links:
|
||||||
|
- name: Telegram Community
|
||||||
|
url: https://t.me/+GclQS9ZnxyI2ODQ1
|
||||||
|
about: Join our Telegram group for questions and discussions
|
||||||
|
- name: GitHub Discussions
|
||||||
|
url: https://github.com/tw93/mole/discussions
|
||||||
|
about: Ask questions and share ideas with the community
|
||||||
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
name: Feature Request
|
||||||
|
about: Suggest an idea for Mole
|
||||||
|
title: '[FEATURE] '
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
## Feature description
|
||||||
|
|
||||||
|
A clear and concise description of the feature you'd like to see.
|
||||||
|
|
||||||
|
## Use case
|
||||||
|
|
||||||
|
Describe the problem this feature would solve or the benefit it would provide.
|
||||||
|
|
||||||
|
## Proposed solution
|
||||||
|
|
||||||
|
How do you envision this feature working?
|
||||||
|
|
||||||
|
## Alternatives considered
|
||||||
|
|
||||||
|
Have you considered any alternative solutions or workarounds?
|
||||||
|
|
||||||
|
## Additional context
|
||||||
|
|
||||||
|
Add any other context, mockups, or examples about the feature request here.
|
||||||
@@ -65,6 +65,7 @@ mo --version # Show installed version
|
|||||||
- Use `mo clean --whitelist` to manage protected caches.
|
- Use `mo clean --whitelist` to manage protected caches.
|
||||||
- Use `mo touchid` to approve sudo with Touch ID instead of typing your password.
|
- Use `mo touchid` to approve sudo with Touch ID instead of typing your password.
|
||||||
- Prefer Vim-style navigation? All menus understand `h/j/k/l` in addition to the arrow keys.
|
- Prefer Vim-style navigation? All menus understand `h/j/k/l` in addition to the arrow keys.
|
||||||
|
- Run into issues? Enable debug mode with `--debug` flag for detailed logs: `mo clean --debug` or `mo clean --dry-run --debug`.
|
||||||
|
|
||||||
## Features in Detail
|
## Features in Detail
|
||||||
|
|
||||||
@@ -193,6 +194,7 @@ For Raycast, reload by running `Reload Script Directories` or restarting Raycast
|
|||||||
|
|
||||||
- If Mole freed storage for you, consider starring the repo or sharing it with friends needing a cleaner Mac.
|
- If Mole freed storage for you, consider starring the repo or sharing it with friends needing a cleaner Mac.
|
||||||
- Have ideas or fixes? Open an issue or PR and help shape Mole's future together with the community.
|
- Have ideas or fixes? Open an issue or PR and help shape Mole's future together with the community.
|
||||||
|
- Report bugs with debug logs by running `mo clean --debug` or `mo <command> --debug` and sharing the output in your issue.
|
||||||
- Love cats? Treat Tangyuan and Cola to canned food via <a href="https://miaoyan.app/cats.html?name=Mole" target="_blank">this link</a> and keep the mascots purring.
|
- Love cats? Treat Tangyuan and Cola to canned food via <a href="https://miaoyan.app/cats.html?name=Mole" target="_blank">this link</a> and keep the mascots purring.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
14
bin/clean.sh
14
bin/clean.sh
@@ -177,6 +177,7 @@ start_section() {
|
|||||||
TRACK_SECTION=1
|
TRACK_SECTION=1
|
||||||
SECTION_ACTIVITY=0
|
SECTION_ACTIVITY=0
|
||||||
CURRENT_SECTION="$1"
|
CURRENT_SECTION="$1"
|
||||||
|
debug_log "Starting section: $1"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${PURPLE_BOLD}${ICON_ARROW} $1${NC}"
|
echo -e "${PURPLE_BOLD}${ICON_ARROW} $1${NC}"
|
||||||
|
|
||||||
@@ -212,6 +213,8 @@ safe_clean() {
|
|||||||
targets=("${@:1:$#-1}")
|
targets=("${@:1:$#-1}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
debug_log "safe_clean: description='$description', target_count=${#targets[@]}"
|
||||||
|
|
||||||
local removed_any=0
|
local removed_any=0
|
||||||
local total_size_bytes=0
|
local total_size_bytes=0
|
||||||
local total_count=0
|
local total_count=0
|
||||||
@@ -461,6 +464,9 @@ start_cleanup() {
|
|||||||
echo -e "${PURPLE_BOLD}Clean Your Mac${NC}"
|
echo -e "${PURPLE_BOLD}Clean Your Mac${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
debug_log "Starting cleanup process"
|
||||||
|
debug_log "DRY_RUN=$DRY_RUN, SYSTEM_CLEAN=$SYSTEM_CLEAN"
|
||||||
|
|
||||||
if [[ "$DRY_RUN" != "true" && -t 0 ]]; then
|
if [[ "$DRY_RUN" != "true" && -t 0 ]]; then
|
||||||
echo -e "${YELLOW}☻${NC} First time? Run ${GRAY}mo clean --dry-run${NC} first to preview changes"
|
echo -e "${YELLOW}☻${NC} First time? Run ${GRAY}mo clean --dry-run${NC} first to preview changes"
|
||||||
fi
|
fi
|
||||||
@@ -469,6 +475,7 @@ start_cleanup() {
|
|||||||
echo -e "${YELLOW}Dry Run Mode${NC} - Preview only, no deletions"
|
echo -e "${YELLOW}Dry Run Mode${NC} - Preview only, no deletions"
|
||||||
echo ""
|
echo ""
|
||||||
SYSTEM_CLEAN=false
|
SYSTEM_CLEAN=false
|
||||||
|
debug_log "Dry run mode enabled"
|
||||||
|
|
||||||
# Initialize export list file
|
# Initialize export list file
|
||||||
mkdir -p "$(dirname "$EXPORT_LIST_FILE")"
|
mkdir -p "$(dirname "$EXPORT_LIST_FILE")"
|
||||||
@@ -536,6 +543,13 @@ EOF
|
|||||||
perform_cleanup() {
|
perform_cleanup() {
|
||||||
echo -e "${BLUE}${ICON_ADMIN}${NC} $(detect_architecture) | Free space: $(get_free_space)"
|
echo -e "${BLUE}${ICON_ADMIN}${NC} $(detect_architecture) | Free space: $(get_free_space)"
|
||||||
|
|
||||||
|
debug_log "Whitelist patterns loaded: ${#WHITELIST_PATTERNS[@]}"
|
||||||
|
if [[ "${MO_DEBUG:-}" == "1" && ${#WHITELIST_PATTERNS[@]} -gt 0 ]]; then
|
||||||
|
for pattern in "${WHITELIST_PATTERNS[@]}"; do
|
||||||
|
debug_log " Whitelist: $pattern"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Pre-check TCC permissions upfront (delegated to clean_caches module)
|
# Pre-check TCC permissions upfront (delegated to clean_caches module)
|
||||||
check_tcc_permissions
|
check_tcc_permissions
|
||||||
|
|
||||||
|
|||||||
@@ -385,8 +385,8 @@ main() {
|
|||||||
log_error "Invalid system health data format"
|
log_error "Invalid system health data format"
|
||||||
echo -e "${YELLOW}Tip:${NC} Check if jq, awk, sysctl, and df commands are available"
|
echo -e "${YELLOW}Tip:${NC} Check if jq, awk, sysctl, and df commands are available"
|
||||||
if [[ "${MO_DEBUG:-}" == "1" ]]; then
|
if [[ "${MO_DEBUG:-}" == "1" ]]; then
|
||||||
echo "DEBUG: Generated JSON:"
|
debug_log "Generated JSON:"
|
||||||
echo "$health_json"
|
debug_log "$health_json"
|
||||||
fi
|
fi
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -398,17 +398,13 @@ main() {
|
|||||||
# Show system health
|
# Show system health
|
||||||
show_system_health "$health_json"
|
show_system_health "$health_json"
|
||||||
|
|
||||||
if [[ "${MO_DEBUG:-}" == "1" ]]; then
|
debug_log "System health displayed"
|
||||||
echo "DEBUG: System health displayed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Parse and display optimizations
|
# Parse and display optimizations
|
||||||
local -a safe_items=()
|
local -a safe_items=()
|
||||||
local -a confirm_items=()
|
local -a confirm_items=()
|
||||||
|
|
||||||
if [[ "${MO_DEBUG:-}" == "1" ]]; then
|
debug_log "Parsing optimizations..."
|
||||||
echo "DEBUG: Parsing optimizations..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use temp file instead of process substitution to avoid hanging
|
# Use temp file instead of process substitution to avoid hanging
|
||||||
local opts_file
|
local opts_file
|
||||||
@@ -417,7 +413,7 @@ main() {
|
|||||||
|
|
||||||
if [[ "${MO_DEBUG:-}" == "1" ]]; then
|
if [[ "${MO_DEBUG:-}" == "1" ]]; then
|
||||||
local opt_count=$(wc -l < "$opts_file" | tr -d ' ')
|
local opt_count=$(wc -l < "$opts_file" | tr -d ' ')
|
||||||
echo "DEBUG: Found $opt_count optimizations"
|
debug_log "Found $opt_count optimizations"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while IFS= read -r opt_json; do
|
while IFS= read -r opt_json; do
|
||||||
@@ -438,23 +434,16 @@ main() {
|
|||||||
fi
|
fi
|
||||||
done < "$opts_file"
|
done < "$opts_file"
|
||||||
|
|
||||||
if [[ "${MO_DEBUG:-}" == "1" ]]; then
|
debug_log "Parsing complete. Safe: ${#safe_items[@]}, Confirm: ${#confirm_items[@]}"
|
||||||
echo "DEBUG: Parsing complete. Safe: ${#safe_items[@]}, Confirm: ${#confirm_items[@]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Execute all optimizations
|
# Execute all optimizations
|
||||||
local first_heading=true
|
local first_heading=true
|
||||||
|
|
||||||
# Debug: show what we're about to do
|
debug_log "About to request sudo. Safe items: ${#safe_items[@]}, Confirm items: ${#confirm_items[@]}"
|
||||||
if [[ "${MO_DEBUG:-}" == "1" ]]; then
|
|
||||||
echo "DEBUG: About to request sudo. Safe items: ${#safe_items[@]}, Confirm items: ${#confirm_items[@]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
ensure_sudo_session "System optimization requires admin access" || true
|
ensure_sudo_session "System optimization requires admin access" || true
|
||||||
|
|
||||||
if [[ "${MO_DEBUG:-}" == "1" ]]; then
|
debug_log "Sudo session established or skipped"
|
||||||
echo "DEBUG: Sudo session established or skipped"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run safe optimizations
|
# Run safe optimizations
|
||||||
if [[ ${#safe_items[@]} -gt 0 ]]; then
|
if [[ ${#safe_items[@]} -gt 0 ]]; then
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ format_last_used_summary() {
|
|||||||
|
|
||||||
# Scan applications and collect information
|
# Scan applications and collect information
|
||||||
scan_applications() {
|
scan_applications() {
|
||||||
|
debug_log "scan_applications: Starting application scan"
|
||||||
# Simplified cache: only check timestamp (24h TTL)
|
# Simplified cache: only check timestamp (24h TTL)
|
||||||
local cache_dir="$HOME/.cache/mole"
|
local cache_dir="$HOME/.cache/mole"
|
||||||
local cache_file="$cache_dir/app_scan_cache"
|
local cache_file="$cache_dir/app_scan_cache"
|
||||||
@@ -82,9 +83,13 @@ scan_applications() {
|
|||||||
[[ $cache_age -eq $(date +%s) ]] && cache_age=86401 # Handle missing file
|
[[ $cache_age -eq $(date +%s) ]] && cache_age=86401 # Handle missing file
|
||||||
if [[ $cache_age -lt $cache_ttl ]]; then
|
if [[ $cache_age -lt $cache_ttl ]]; then
|
||||||
# Cache hit - return immediately
|
# Cache hit - return immediately
|
||||||
|
debug_log "scan_applications: Using cached app list (age: ${cache_age}s)"
|
||||||
echo "$cache_file"
|
echo "$cache_file"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
debug_log "scan_applications: Cache expired (age: ${cache_age}s > ${cache_ttl}s)"
|
||||||
|
else
|
||||||
|
debug_log "scan_applications: No cache found, performing fresh scan"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cache miss - show scanning feedback below
|
# Cache miss - show scanning feedback below
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ clean_sandboxed_app_caches() {
|
|||||||
|
|
||||||
# Clean browser caches (Safari, Chrome, Edge, Firefox, etc.)
|
# Clean browser caches (Safari, Chrome, Edge, Firefox, etc.)
|
||||||
clean_browsers() {
|
clean_browsers() {
|
||||||
|
debug_log "clean_browsers: Starting browser cache cleanup"
|
||||||
safe_clean ~/Library/Caches/com.apple.Safari/* "Safari cache"
|
safe_clean ~/Library/Caches/com.apple.Safari/* "Safari cache"
|
||||||
|
|
||||||
# Chrome/Chromium
|
# Chrome/Chromium
|
||||||
@@ -121,12 +122,16 @@ clean_browsers() {
|
|||||||
|
|
||||||
# Service Worker CacheStorage (all profiles)
|
# Service Worker CacheStorage (all profiles)
|
||||||
# Show loading indicator for potentially slow scan
|
# Show loading indicator for potentially slow scan
|
||||||
|
debug_log "clean_browsers: Scanning for Service Worker caches"
|
||||||
if [[ -t 1 ]]; then
|
if [[ -t 1 ]]; then
|
||||||
MOLE_SPINNER_PREFIX=" " start_inline_spinner "Scanning browser Service Worker caches..."
|
MOLE_SPINNER_PREFIX=" " start_inline_spinner "Scanning browser Service Worker caches..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Scan for Service Worker caches with timeout protection
|
# Scan for Service Worker caches
|
||||||
|
# Use process substitution to avoid subshell issues with set -e
|
||||||
|
local sw_count=0
|
||||||
while IFS= read -r sw_path; do
|
while IFS= read -r sw_path; do
|
||||||
|
((sw_count++))
|
||||||
[[ -z "$sw_path" ]] && continue
|
[[ -z "$sw_path" ]] && continue
|
||||||
local profile_name=$(basename "$(dirname "$(dirname "$sw_path")")")
|
local profile_name=$(basename "$(dirname "$(dirname "$sw_path")")")
|
||||||
local browser_name="Chrome"
|
local browser_name="Chrome"
|
||||||
@@ -135,7 +140,7 @@ clean_browsers() {
|
|||||||
[[ "$sw_path" == *"Arc"* ]] && browser_name="Arc"
|
[[ "$sw_path" == *"Arc"* ]] && browser_name="Arc"
|
||||||
[[ "$profile_name" != "Default" ]] && browser_name="$browser_name ($profile_name)"
|
[[ "$profile_name" != "Default" ]] && browser_name="$browser_name ($profile_name)"
|
||||||
clean_service_worker_cache "$browser_name" "$sw_path"
|
clean_service_worker_cache "$browser_name" "$sw_path"
|
||||||
done < <(run_with_timeout 10 find "$HOME/Library/Application Support/Google/Chrome" \
|
done < <(find "$HOME/Library/Application Support/Google/Chrome" \
|
||||||
"$HOME/Library/Application Support/Microsoft Edge" \
|
"$HOME/Library/Application Support/Microsoft Edge" \
|
||||||
"$HOME/Library/Application Support/BraveSoftware/Brave-Browser" \
|
"$HOME/Library/Application Support/BraveSoftware/Brave-Browser" \
|
||||||
"$HOME/Library/Application Support/Arc/User Data" \
|
"$HOME/Library/Application Support/Arc/User Data" \
|
||||||
@@ -145,6 +150,7 @@ clean_browsers() {
|
|||||||
if [[ -t 1 ]]; then
|
if [[ -t 1 ]]; then
|
||||||
stop_inline_spinner
|
stop_inline_spinner
|
||||||
fi
|
fi
|
||||||
|
debug_log "clean_browsers: Found $sw_count Service Worker cache paths"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clean cloud storage app caches
|
# Clean cloud storage app caches
|
||||||
|
|||||||
@@ -328,6 +328,13 @@ log_error() {
|
|||||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] ERROR: $1" >> "$LOG_FILE" 2> /dev/null || true
|
echo "[$(date '+%Y-%m-%d %H:%M:%S')] ERROR: $1" >> "$LOG_FILE" 2> /dev/null || true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Debug logging - only shown when MO_DEBUG=1
|
||||||
|
debug_log() {
|
||||||
|
if [[ "${MO_DEBUG:-}" == "1" ]]; then
|
||||||
|
echo -e "${GRAY}[DEBUG]${NC} $*" >&2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Run command with optional error handling
|
# Run command with optional error handling
|
||||||
# Usage: run_silent command args... # Ignore errors
|
# Usage: run_silent command args... # Ignore errors
|
||||||
# run_logged command args... # Log errors but continue
|
# run_logged command args... # Log errors but continue
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ decode_file_list() {
|
|||||||
# Args: $1 = bundle_id, $2 = has_system_files (true/false)
|
# Args: $1 = bundle_id, $2 = has_system_files (true/false)
|
||||||
stop_launch_services() {
|
stop_launch_services() {
|
||||||
local bundle_id="$1"
|
local bundle_id="$1"
|
||||||
|
debug_log "stop_launch_services: Stopping services for $bundle_id"
|
||||||
local has_system_files="${2:-false}"
|
local has_system_files="${2:-false}"
|
||||||
|
|
||||||
# User-level Launch Agents
|
# User-level Launch Agents
|
||||||
|
|||||||
39
mole
39
mole
@@ -22,7 +22,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
source "$SCRIPT_DIR/lib/core/common.sh"
|
source "$SCRIPT_DIR/lib/core/common.sh"
|
||||||
|
|
||||||
# Version info
|
# Version info
|
||||||
VERSION="1.11.24"
|
VERSION="1.11.25"
|
||||||
MOLE_TAGLINE="can dig deep to clean your Mac."
|
MOLE_TAGLINE="can dig deep to clean your Mac."
|
||||||
|
|
||||||
# Check if Touch ID is already configured
|
# Check if Touch ID is already configured
|
||||||
@@ -174,6 +174,9 @@ show_help() {
|
|||||||
printf " %s%-28s%s %s\n" "$GREEN" "mo --version" "$NC" "Show version"
|
printf " %s%-28s%s %s\n" "$GREEN" "mo --version" "$NC" "Show version"
|
||||||
printf " %s%-28s%s %s\n" "$GREEN" "mo --help" "$NC" "Show help"
|
printf " %s%-28s%s %s\n" "$GREEN" "mo --help" "$NC" "Show help"
|
||||||
echo
|
echo
|
||||||
|
printf "%s%s%s\n" "$BLUE" "OPTIONS" "$NC"
|
||||||
|
printf " %s%-28s%s %s\n" "$GREEN" "--debug" "$NC" "Show detailed debug logs"
|
||||||
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
# Simple update function
|
# Simple update function
|
||||||
@@ -672,24 +675,42 @@ interactive_main_menu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
case "${1:-""}" in
|
# Parse global flags from any position in arguments
|
||||||
|
local -a args=()
|
||||||
|
for arg in "$@"; do
|
||||||
|
case "$arg" in
|
||||||
|
--debug)
|
||||||
|
export MO_DEBUG=1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
args+=("$arg")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Show debug indicator if enabled
|
||||||
|
if [[ "${MO_DEBUG:-}" == "1" && -t 2 ]]; then
|
||||||
|
echo -e "${GRAY}[DEBUG MODE ENABLED]${NC}" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "${args[0]:-""}" in
|
||||||
"optimize")
|
"optimize")
|
||||||
exec "$SCRIPT_DIR/bin/optimize.sh"
|
exec "$SCRIPT_DIR/bin/optimize.sh" "${args[@]:1}"
|
||||||
;;
|
;;
|
||||||
"clean")
|
"clean")
|
||||||
exec "$SCRIPT_DIR/bin/clean.sh" "${@:2}"
|
exec "$SCRIPT_DIR/bin/clean.sh" "${args[@]:1}"
|
||||||
;;
|
;;
|
||||||
"uninstall")
|
"uninstall")
|
||||||
exec "$SCRIPT_DIR/bin/uninstall.sh"
|
exec "$SCRIPT_DIR/bin/uninstall.sh" "${args[@]:1}"
|
||||||
;;
|
;;
|
||||||
"analyze")
|
"analyze")
|
||||||
exec "$SCRIPT_DIR/bin/analyze.sh" "${@:2}"
|
exec "$SCRIPT_DIR/bin/analyze.sh" "${args[@]:1}"
|
||||||
;;
|
;;
|
||||||
"status")
|
"status")
|
||||||
exec "$SCRIPT_DIR/bin/status.sh" "${@:2}"
|
exec "$SCRIPT_DIR/bin/status.sh" "${args[@]:1}"
|
||||||
;;
|
;;
|
||||||
"touchid")
|
"touchid")
|
||||||
exec "$SCRIPT_DIR/bin/touchid.sh" "${@:2}"
|
exec "$SCRIPT_DIR/bin/touchid.sh" "${args[@]:1}"
|
||||||
;;
|
;;
|
||||||
"update")
|
"update")
|
||||||
update_mole
|
update_mole
|
||||||
@@ -711,7 +732,7 @@ main() {
|
|||||||
interactive_main_menu
|
interactive_main_menu
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown command: $1"
|
echo "Unknown command: ${args[0]}"
|
||||||
echo "Use 'mole --help' for usage information."
|
echo "Use 'mole --help' for usage information."
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user