A few days ago, I read Bash Script Templates and I think this might be a good idea to start one of my own. I later found two more posts about it, it's not easy to find one. Either search engine was playing with me or I was too dumb to enter perfect search terms.

I read them and got some concepts from all three of them. Some I like, some I don't. I mingled them altogether with my own thoughts. I created a new repository: template.sh, it could be a good idea for it to have own repo, so you may contribute to it easily.

It's still a work-in-progress, but it already has 177 lines (159 sloc) for first version. I have been thinking that a library could be a better idea, especially when I was writing the parse_options function. It could be working like argument parsing in C or in Python with their libraries, and the code would be more clean.

I had also thought of creating user interface, you can click buttons or be asked questions to enable/disable features, then a template will be generated. But that's a lot of works, not sure if that's worth. I didn't go that way eventually, but a simple file.

Please be aware that I haven't used it yet, so I don't really know if it's practical enough. If you run into trouble, please open an issue. Any feedback is welcome, leave a comment.