script: use `[[` instead of `[` for if statements