tiny-pilot / tinypilot

Use your Raspberry Pi as a browser-based KVM.
https://tinypilotkvm.com
MIT License
3.07k stars 259 forks source link

Use bash arithmetic checks #1836

Closed jdeanwallace closed 3 months ago

jdeanwallace commented 3 months ago

Resolves https://github.com/tiny-pilot/tinypilot/issues/1780

This PR align our bash scripts with the Google Shell Style Guide:

For preference, don’t use [[ … ]] at all for numeric comparisons, use (( … )) instead.

Notes:

  1. I've replaced numerics checks using [[ -ne ]] with (( != ))
  2. I've replaced numerics checks using [[ == ]] with (( == ))

Review on CodeApprove

jdeanwallace commented 3 months ago
Automated comment from CodeApprove ➜

⏳ @jotaen4tinypilot please review this Pull Request