Skip to content

Commit

Permalink
add sorcery support (source mage's pm) (#45)
Browse files Browse the repository at this point in the history
* add sorcery support (source mage's pm)

clean is not necessary, as this is done by default on dispel. there is no way, afaik, to remove them (outside of/after using) dispel.

* update readme to include sorcery

* relocate sorcery to be behind nix/guix

* update zipper comment to make logical sense
  • Loading branch information
foxsouns authored Oct 22, 2021
1 parent 25be130 commit b1c48c5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ $ cpm [i|r|l|u|U|s|S|I|F|f|c|h] [pkg]...
- guix (non-system-wide Guix)
- pacman (Arch)
- slackpkg (Slackware)
- sorcery (Source Mage)
- urpmi (Mageia)
- xbps (Void)
- zypper (OpenSUSE)
Expand Down
21 changes: 20 additions & 1 deletion cpm
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,22 @@ _zypper() {
esac
}

_sorcery() {
case "$OP" in
install) $SUDO cast "$@";;
remove) $SUDO dispell "$@";;
list) gaze installed;;
count) gaze installed | tot;;
update) $SUDO sorcery -u;;
upgrade) $SUDO sorcery -g;;
search) gaze search "$@";;
show) gaze what "$@";;
files) gaze tablet spell-files "$@";;
from) gaze from "$@";;
clean) pem "unsupported: this feature is functionally useless in this PM";;
esac
}

_guix() {
case "$OP" in
install) guix package --install "$@";;
Expand Down Expand Up @@ -415,8 +431,11 @@ elif has slackpkg; then
# slackware
_slackpkg "$@"
elif has zypper; then
# slackware
# opensuse
_zypper "$@"
elif has sorcery; then
# source mage
_sorcery "$@"
elif has nix; then
# global/nixos
_nix "$@"
Expand Down

0 comments on commit b1c48c5

Please sign in to comment.