Skip to content

Commit

Permalink
impliment CRUX, ren lunar, remove duplicate in filelistftr (#50)
Browse files Browse the repository at this point in the history
* add crux, ren Lunar

* impliment CRUX, ren lunar

we fall out of spec again on clean. pkgutils is pretty rudimentary, and doesn't have a remove w/ deps, and i elected to use standard install, over depinst. info should provide a deplist, useful for inst or rm.

* fix filelistftr() for the last time (i hope)
  • Loading branch information
foxsouns authored Dec 7, 2021
1 parent 877aeda commit 18d2831
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ $ cpm [i|r|l|u|U|s|S|I|F|f|c|h] [pkg]...

- apk (Alpine/Adélie)
- apt (Debian/Ubuntu)
- pkgutils (CRUX)
- emerge (Gentoo)
- dnf (Fedora)
- lunar (Lunar Linux)
- MacPorts (macOS)
- guix (non-system-wide Guix)
- lunar (Lunar)
- MacPorts (macOS)
- pacman (Arch)
- slackpkg (Slackware)
- sorcery (Source Mage)
Expand Down
22 changes: 20 additions & 2 deletions cpm
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ filelistftr() {
if [ -f "$pkginfo" ]; then
unset found
while IFS= read -r line; do
[ "$line" = "$3" ] && found=1
[ "$line" = "$str" ] && found=1
[ "$found" ] && printf "%s\n" "$line"
done <"$pkginfo"
Expand Down Expand Up @@ -384,6 +383,22 @@ _lunar() {
esac
}

_crux() {
case "$OP" in
install) prt-get install "$@";;
remove) prt-get remove "$@";;
list) prt-get listinst;;
count) prt-get listinst | tot;;
update) prt-get update "$@";;
upgrade) prt-get sysup;;
search) prt-get search "$@";;
show) prt-get info "$@";;
files) prt-get ls "$@";;
from) prt-get fsearch "$@";;
clean) prt-get cache && pkgfoster;;
esac
}

_guix() {
case "$OP" in
install) guix package --install "$@";;
Expand Down Expand Up @@ -435,8 +450,11 @@ elif ! [ "$(uname -s)" = "Darwin" ]; then
# source mage
_sorcery "$@"
elif has lunar; then
# lunar linux
# lunar
_lunar "$@"
elif has prt-get; then
# crux
_crux "$@"
elif has guix; then
# local (non-system-wide) guix
_guix "$@"
Expand Down

0 comments on commit 18d2831

Please sign in to comment.