make gen.bash simpler