From 3a4ab6d7a6efcc4b94cc2e07ba4af945ff64854f Mon Sep 17 00:00:00 2001 From: Sage Date: Fri, 22 Oct 2021 07:49:01 -0700 Subject: [PATCH] add Lunar to cpm (#48) lunar is the PM of Lunar Linux. it feels like a reskin of sorcery, but with slightly more functionality, and more "logical" names for the PM. --- README.md | 1 + cpm | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/README.md b/README.md index ac1a94f..d71230a 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ $ cpm [i|r|l|u|U|s|S|I|F|f|c|h] [pkg]... - apt (Debian/Ubuntu) - emerge (Gentoo) - dnf (Fedora) +- lunar (Lunar Linux) - MacPorts (MacOS) - nix (Global/NixOS) - guix (non-system-wide Guix) diff --git a/cpm b/cpm index 85d6b7d..448a4b0 100755 --- a/cpm +++ b/cpm @@ -369,6 +369,22 @@ _sorcery() { esac } +_lunar() { + case "$OP" in + install) $SUDO lunar install "$@";; + remove) $SUDO lunar remove "$@";; + list) lvu installed;; + count) lvu installed | tot;; + update) $SUDO lunar renew;; + upgrade) $SUDO lunar update;; + search) lvu search "$@";; + show) lvu what "$@";; + files) lvu where "$@";; + from) lvu from "$@";; + clean) $SUDO lunar prune;; + esac +} + _guix() { case "$OP" in install) guix package --install "$@";; @@ -436,6 +452,9 @@ elif has zypper; then elif has sorcery; then # source mage _sorcery "$@" +elif has lunar; then + # lunar linux + _lunar "$@" elif has nix; then # global/nixos _nix "$@"