108 lines
3.6 KiB
Groff
108 lines
3.6 KiB
Groff
.\" Manpage for instalee - https://git.jfischer.org/xeruf/instalee
|
|
.\" Contact 27jf@pm.me for improvements.
|
|
|
|
.TH man 1 "22 Nov 2022" "0.1" "instalee man page"
|
|
|
|
.SH NAME
|
|
|
|
instalee - Unix-style universal package installation wrapper
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B instalee <packagename>...
|
|
- install packages
|
|
.br
|
|
.B instalee <-a|--add> [packagename] [handler] [<content>]
|
|
- add new packages
|
|
|
|
.SH DESCRIPTION
|
|
|
|
Instalee provides a generic interface for installing packages.
|
|
It relies on the user configuring it to pers needs, keeping the core logic as simple as possible.
|
|
|
|
Use it to set up servers as well as temporary and permanent computers to your needs across operating systems.
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
|
<packagename>
|
|
The package. Corresponds to a directory in \fIpackages\fP.
|
|
.TP
|
|
-a|--add
|
|
Add a package entry to the repo. Will prompt for missing arguments.
|
|
.TP
|
|
<identifier>
|
|
Name of the handler for this entry,
|
|
including potential pre- and suffixes.
|
|
.TP
|
|
<content>
|
|
Content of the file for the package to be added.
|
|
If omitted, the file is opened with $EDITOR.
|
|
Note that the parent directory already exists by then, but the file does not.
|
|
|
|
.SH SETUP
|
|
|
|
Instalee requires a CONFIGURATION DIRECTORY containing a \fIhandlers\fP and \fIpackages\fP directory and the \fIhandlers.available\fP file.
|
|
|
|
The \fIhandlers\fP directory contains a directory for each package manager.
|
|
Usually you will only need to create a directory for the package manager and then an \fIinstall\fP file that processes packages.
|
|
The file should be executable.
|
|
It will receive the \fIpackage\fP file result as argument, or merely the package name in case that is empty.
|
|
|
|
When using multiple different system, the \fIhandlers.available\fP file unfolds its purpose.
|
|
It is simply a newline-separated list of the package handlers available on the system, in order of preference.
|
|
When installing a package, instalee uses the first match of a \fIhandlers.available\fP entry with a file in the package directory.
|
|
|
|
The \fIpackages\fP directory will contain the bulk of the information.
|
|
It contains a directory for each package, which is then filled with files named according to the handler they represent.
|
|
There are three options for this file, and the result determines the arguments to the \fIhandler\fP:
|
|
.RS
|
|
1. The file is empty. The package name is used as argument.
|
|
.RE
|
|
.RS
|
|
2. The file is a textfile. The contents are used as argument.
|
|
.RE
|
|
.RS
|
|
3. The file is executable. The file is executed and the output is used as argument.
|
|
.RE
|
|
|
|
If a \fIhandler\fP is available without entry in \fIhandlers\fP (commonly named after what it requires as/on the system), package files for that handler will be executed without invoking a handler. Such a package file must be executable.
|
|
|
|
.SH CONFIGURATION DIRECTORY
|
|
|
|
Instalee is configured through a folder defaulting to XDG_CONFIG_HOME/instalee, if that does not exist it will try to use the current working directory or the directory of the executable.
|
|
|
|
The following locations are tried, in that order:
|
|
- INSTALEE_HOME
|
|
- XDG_CONFIG_HOME/instalee
|
|
- HOME/.instalee
|
|
- Directory of the executable (thus installation to /opt or portable locations is also easily imaginable)
|
|
- Current working directory
|
|
|
|
.SH PACKAGING
|
|
|
|
- Ensure an executable entry processed by a handler does not accidentally print to stdout
|
|
- Link an upstream source for scripts if possible
|
|
- Try to stick to "/bin/sh -e" as shebang, requiring bash only if needed
|
|
|
|
.SH EXIT CODES
|
|
|
|
.TP
|
|
0
|
|
Success
|
|
.TP
|
|
1
|
|
Unexpected exit
|
|
.TP
|
|
2
|
|
Could not install all packages
|
|
|
|
.SH BUGS
|
|
|
|
Exhaustive testing is missing everywhere :)
|
|
Please report issues on https://github.com/xeruf/instalee/issues
|
|
(note: forge is subject to change)
|
|
|
|
.SH AUTHOR
|
|
|
|
xeruf (27jf@pm.me)
|