Heyas
If you recall, not too long ago, i was asking about the GNU Autotools. The feedback on that was almost unisense, and me figured that it turned my (back then) +98% SHELL project into a +73% GROFF project...
Felt a bit overhelmed, specialy since i didnt actualy use or need the true purpose of those tools....
But it sure helped me lots understanding the whole installation process (a little bit) better.
Eventually i thought i could write my own 'installer' (aka configure) script -> YASSI -> Yet Another Simple Script Installer.
The help screen will look quite familiar...
For basic installations, one runs ./configure [--prefix=/usr]
which generates:
- make-install
- make-uninstall
- make-distclean
A basic installation of a small script based project could look as simple as (in the configure.cfg
):
APP=my-script
BINDIR=myscript.sh
MAN1DIR=man/*1
DOCDIR="README.md docs/LICENSE"
DATADIR=./data_subdir
For more complex projects, one could use doRef=true
to get the dirs used by the project saved to: <PREFIX>/<SYSCONFDIR>/<APP>.conf (defaults: [/usr{/local}]/etc or $HOME/.local/etc)
So within your project, you just need to figure that single file, to get all your default/used directories.
However, for more tweaking i've added some arrays that are parsed at different times.
- PREPARE is run during ./configure, so its actions are applied to
./configure --tarball --prefix=/usr
- PRIOR is run before the actual install, during ./make-install
- POST is run after the actual install, during ./make-install
- CLEAN is run during ./make-distclean, and should be used to remove files from PREPARE
- REMOVE is run during ./make-uninstall, and should be used to remove files from PRIOR
- IGNORE is run during ./configure --tarball, and should be used to share the prepared project with family or friends.
For obvious reasons, it supplies 2 samples, a default one and a full one (with my own preferences, to illustrate what is possible).
I wonder if you would have any further thoughts or ideas?
Otherwise, i hope this helps - thought this is not a release yet.
Thank you
EDIT:
Sorry, i've already had a thread on it... http://www.unix.com/unix-for-advanced-and-expert-users/260006-simple-un-installation-scripts-using-yassi.html\#post302951707
@Mod: Mind merging?