- allow to pass environment variable '$YUM_OPTS' (to allow adding for example '--assumeyes')
- only try to uninstall existing template package if already installed to avoid failing and unnecessary output and prompts
- output
- refactoring
- By default, add only newest versions to the list of files to be installed.
- Add older versions commented out by default.
- Do not try to install out commented versions.
- Renamed variable file to file_name ['file' is a unix standard utility].
- Enabled errexit.
- Refactoring, keep write variables part simpler by just writing, not determining variables contents.
- use more quotes
Fixes https://github.com/QubesOS/qubes-issues/issues/1109.