man(1)

NAME
instalee - Unix-style universal package installation wrapper

SYNOPSIS
instalee <packagename>... - install packages
instalee <-a|--add> [packagename] [handler] [<content>] - add new packages

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.

OPTIONS

<packagename>
    The package. Corresponds to a directory in packages.

-a|--add
    Add a package entry to the repo. Will prompt for missing arguments.

<identifier>
    Name of the handler for this entry, including potential pre- and suffixes.

<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.

SETUP
Instalee requires a CONFIGURATION DIRECTORY containing a handlers and packages directory and the handlers.available file. The handlers directory contains a directory for each package manager. Usually you will only need to create a directory for the package manager and then an install file that processes packages. The file should be executable. It will receive the package file result as argument, or merely the package name in case that is empty. When using multiple different system, the handlers.available 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 handlers.available entry with a file in the package directory. The packages 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 handler:
    1. The file is empty. The package name is used as argument.
    2. The file is a textfile. The contents are used as argument.
    3. The file is executable. The file is executed and the output is used as argument.
If a handler is available without entry in handlers (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.

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

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

EXIT CODES

0   Success

1   Unexpected exit

2   Could not install all packages

BUGS
Exhaustive testing is missing everywhere :) Please report issues on https://github.com/xeruf/instalee/issues (note: forge is subject to change)

AUTHOR
xeruf (27jf@pm.me)