Accidentally had only comments in a if structure, which is a syntax error in bash.