gen-version.sh: Syntax error: redirection unexpected

Fix issue #502