Suppose I'm working on software to be installed on a Linux machine (not mine).
Say the software consists of applications the user might start independently; an application which will likely be started on desktop environment login, a service which should be started when the system boots; and libraries, some shared among multiple apps and some separate.
Now suppose that each of the above is maintained as its own git repository; and that I build everything with CMake, looking for the dependencies as already-built-and-installed software, nor as additional source directories. I also don't use git submodules (At least - I don't right now.)
None of the projects has code that takes care of retrieving everything, building everything, and triggering an install of everything - plus there are tasks like creating an /etc/init.d
service (or a systemd service if you lean that way). And so, what I currently do is have a simple shell script for doing all of these things. A sort of an installer or installation-orchestrator.
I don't like this, because:
- I lied, the script doesn't really exist yet, there are partial scripts that do some of this stuff, and the rest is done by hand.
- No uninstallation/cleanup script - unless I write that one too.
- I want to be able to check versions of what I've installed - without checking versions on all the files
- I bet there are generic deployment mechanisms I could be using, and I just don't know them, and I'll feel like a fool reinventing the wheel with my own scripts.
- I want this installation to be automagically updatable when something changes in the repositories'
CMakeLists.txt
, without having to manually propagate changes to my installation script.
My question: How can I better orchestrate my installation? Is there some better option than a custom shell script for this?