Skip to content

Commit d774579

Browse files
committed
refactor: replace ((var++)) with var=$((var + 1)) for counter increments
1 parent 99465d3 commit d774579

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

debian/unifi-on-boot

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,28 @@ while IFS= read -r -d '' entry; do
3535
log "Executing: ${filename}"
3636
if "$entry"; then
3737
log "Success: ${filename}"
38-
((success_count++))
38+
success_count=$((success_count + 1))
3939
else
4040
rc=$?
4141
log "Failed: ${filename} (exit code: ${rc})"
42-
((fail_count++))
42+
fail_count=$((fail_count + 1))
4343
fi
44-
((script_count++))
44+
script_count=$((script_count + 1))
4545
elif [[ "$entry" == *.sh ]]; then
4646
# Non-executable .sh file: source it
4747
log "Sourcing: ${filename}"
4848
if (source "$entry"); then
4949
log "Success: ${filename}"
50-
((success_count++))
50+
success_count=$((success_count + 1))
5151
else
5252
rc=$?
5353
log "Failed: ${filename} (exit code: ${rc})"
54-
((fail_count++))
54+
fail_count=$((fail_count + 1))
5555
fi
56-
((script_count++))
56+
script_count=$((script_count + 1))
5757
else
5858
log "Ignoring: ${filename} (not executable and not .sh)"
59-
((skip_count++))
59+
skip_count=$((skip_count + 1))
6060
fi
6161
done < <(find -L "$BOOT_DIR" -mindepth 1 -maxdepth 1 -type f -print0 | sort -z)
6262

0 commit comments

Comments
 (0)