curate-pkg
the script that keeps a consistent state of installed packages across ALL Linux package managers and distributions
Version 1.63
Table of Contents
Introduction
What fits you best?
- frequent distro-hopping? Install your favourite music player and that awesome tinker tool that you love with one script run.
- determined distro-hugging? Update all your packages
and get detailed information about what was updated(TODO)with one command or background service.
Supported package managers:
aptbrewdnfeopkgflatpakgonixnpmpacaurpacmanpipsnapyaourt
Installation
Using the AUR
yaourt --aur -Syyu curate-pkg-gitManual
git clone https://github.com/andrei-pavel/curate-pkg.git
cd curate-pkg
./installDependencies
- yq (
2.3.4or newer) - used for processing YAML configuration files, installed automagically through./installif you don't already have it. - bash-spinner - shamelessly copied in this repository, installed automagically through
./install - unp - for
wgetables, could you please install it manually?
Configuration
Configuration files are one per main package manager.
After installing, edit ~/.config/curate-pkg/<main_package_manager>.yaml.
installablesare packages to be installed.wgetablesare downloadable URLs to be installed via it's specific package manager or extracted to/usr/local.sourceskeyspurgeablesare packages to be removed or purged.commandsare custom, tailored to it's package manager.
Samples:
apt: apt.yamlbrew: brew.yamldnf: dnf.yamleopkg: eopkg.yamlflatpak: flatpak.yamlgo: go.yamlnix: nix.yamlnpm: npm.yamlpacaur: usespacman.yamlpacman: pacman.yamlpip: pip.yamlsnap: snap.yamlyaourt: usespacman.yaml
Usage
Usage: curate-pkg {{options}} {{arguments}}
Options:
[-d|--debug] Enables debug mode, showing every executed statement.
[-h|--help] Prints usage (this text).
Arguments:
[-a|--auto] Cool continuous curation
[-i|--install $package] Installs a single package.
[-k|--add-key $key] Adds a single key.
[-p|--purge|--remove $package] Removes a single package.
[-r|--add-repository $repository] Adds a single repository.
[-s|--add-source $source] Adds a single source.
[-u|--upgrade $package] Upgrades a single package.
[-v|--verbose] Verbose output
[-V|--version] Display version and exit.
$package_manager Run only for this specific package manager.Start by running curate-pkg everyday to keep all your packages up to date. Then experiment with other options. Terminology in the help section is based on apt because it is the more complex than most.
Contributing
For changes to the package manager engine, you only need to know bash and try to respect portability best practices. If you add a new argument, add it to the print usage function, the bash completions file and README.md.
If, however, you wish to add support for a package manager, either create an issue, or follow these steps given for pkg as said package manager:
cp share/empty.sh share/packages-managers/pkg.sh- Implement all functions in
share/packages-managers/pkg.sh. - Add
pkgto./curate-pkgin the main list or optional list accordingly. If it is the default package manager in any distribution it is main, else it is optional. - Add
pkgto the list in./installif it has a standalone.yamlconfiguration file (e.g.pacmandoes,yaourtdoesn't since it usespacman's). - Add your
pkg.yamlconfiguration file to./share/samples. - Add
pkgtoREADME.md.
In any case, bump the version in the README.md and in the code where -V|--version is handled by setting it to 1.$(( $(git rev-list --count master) + 1 ))
Thank you for your contribution!