1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 19:09:43 +00:00

optimize code syntax

This commit is contained in:
Tw93
2026-01-23 09:43:04 +08:00
parent 340a71056c
commit 7e40824fa3

View File

@@ -137,7 +137,7 @@ scan_applications() {
done < <(command find "$app_dir" -name "*.app" -maxdepth 3 -print0 2> /dev/null)
done
if [[ ${#app_data_tuples[@]:-0} -eq 0 ]]; then
if [[ ${#app_data_tuples[@]} -eq 0 ]]; then
rm -f "$temp_file"
printf "\r\033[K" >&2
echo "No applications found to uninstall." >&2
@@ -145,7 +145,7 @@ scan_applications() {
fi
# Pass 2: metadata + size in parallel (mdls is slow).
local app_count=0
local total_apps=${#app_data_tuples[@]:-0}
local total_apps=${#app_data_tuples[@]}
local max_parallel
max_parallel=$(get_optimal_parallel_jobs "io")
if [[ $max_parallel -lt 8 ]]; then