Use POSIX shell script syntax for portability

Ubuntu happens to use Dash as its shell, which lacks some Bash syntax found in most shells. The `[[` conditional syntax would throw an error. The POSIX-compatible syntax is `[` and a `=` equality test instead of `==`. Additional info: https://wiki.ubuntu.com/DashAsBinSh