Fix bash comparisons

Apparently I have no idea how to write correct shell scripts.

/review @adepie @dhui