Page MenuHomePhabricator

[services] Clean up `run_server_image.sh`
ClosedPublic

Authored by abosh on Jun 29 2022, 8:10 AM.
Tags
None
Referenced Files
F2210356: D4398.id.diff
Sun, Jul 7, 10:25 PM
Unknown Object (File)
Sun, Jul 7, 12:12 AM
Unknown Object (File)
Sat, Jul 6, 7:30 PM
Unknown Object (File)
Sat, Jul 6, 7:30 PM
Unknown Object (File)
Sat, Jul 6, 7:30 PM
Unknown Object (File)
Sat, Jul 6, 7:30 PM
Unknown Object (File)
Sat, Jul 6, 7:30 PM
Unknown Object (File)
Thu, Jul 4, 12:39 AM
Subscribers

Details

Summary

Cleaned up run_server_image.sh with style fixes and some double quoting to safely prevent globbing and word splitting. More details in inline comments.

Test Plan

ShellCheck, close reading.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

services/scripts/run_server_image.sh
6 ↗(On Diff #13967)

Changed this to "arguments" to match lines 7 and 9. Arguments seems to be the correct term for this use case (elements following the command/positional parameters), whereas parameters seems to describe something that can provide information to a flag or option. Either way, this should match what's on lines 7 and 9.

16 ↗(On Diff #13967)

Use -n instead of ! -z. This is a style fix, but it's the equivalent of removing a double negation when not necessary (since -n checks to see if a string is non-empty).

20 ↗(On Diff #13967)
24 ↗(On Diff #13967)
32 ↗(On Diff #13967)
ashoat requested changes to this revision.Jun 29 2022, 1:10 PM

Can we fix this up to use [[ ]] instead of [ ]? Context here

This revision now requires changes to proceed.Jun 29 2022, 1:10 PM
This revision is now accepted and ready to land.Jun 29 2022, 1:19 PM