Skip to content

Commit

Permalink
add Lunar to cpm (#48)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
foxsouns authored Oct 22, 2021
1 parent b1c48c5 commit 3a4ab6d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
19 changes: 19 additions & 0 deletions cpm
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@";;
Expand Down Expand Up @@ -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 "$@"
Expand Down

0 comments on commit 3a4ab6d

Please sign in to comment.