1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-11 04:49:17 +00:00

chore: auto format code

This commit is contained in:
Tw93
2025-12-10 06:40:45 +00:00
parent 65743da349
commit 9514b54554

View File

@@ -129,19 +129,19 @@ clean_orphaned_app_data() {
while IFS= read -r app_path; do while IFS= read -r app_path; do
[[ -n "$app_path" ]] && app_paths+=("$app_path") [[ -n "$app_path" ]] && app_paths+=("$app_path")
done < <(find "$app_dir" -name '*.app' -maxdepth 3 -type d 2> /dev/null) done < <(find "$app_dir" -name '*.app' -maxdepth 3 -type d 2> /dev/null)
# Read bundle IDs with PlistBuddy # Read bundle IDs with PlistBuddy
local count=0 local count=0
for app_path in "${app_paths[@]}"; do for app_path in "${app_paths[@]}"; do
local plist_path="$app_path/Contents/Info.plist" local plist_path="$app_path/Contents/Info.plist"
[[ ! -f "$plist_path" ]] && continue [[ ! -f "$plist_path" ]] && continue
local bundle_id=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$plist_path" 2> /dev/null || echo "") local bundle_id=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$plist_path" 2> /dev/null || echo "")
if [[ -n "$bundle_id" ]]; then if [[ -n "$bundle_id" ]]; then
echo "$bundle_id" echo "$bundle_id"
((count++)) ((count++))
# Batch update progress every 10 apps to reduce I/O # Batch update progress every 10 apps to reduce I/O
if [[ $((count % 10)) -eq 0 ]]; then if [[ $((count % 10)) -eq 0 ]]; then
local current=$(cat "$progress_count_file" 2> /dev/null || echo "0") local current=$(cat "$progress_count_file" 2> /dev/null || echo "0")
@@ -149,7 +149,7 @@ clean_orphaned_app_data() {
fi fi
fi fi
done done
# Final progress update # Final progress update
if [[ $((count % 10)) -ne 0 ]]; then if [[ $((count % 10)) -ne 0 ]]; then
local current=$(cat "$progress_count_file" 2> /dev/null || echo "0") local current=$(cat "$progress_count_file" 2> /dev/null || echo "0")