change name to vbm

This commit is contained in:
zenobit 2021-12-24 20:50:02 +00:00 committed by zenobit
parent 060ca65ffa
commit 3945e10e4b
12 changed files with 12734 additions and 106 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.history

View File

@ -7,14 +7,14 @@ all:
.PHONY: install .PHONY: install
install: install:
cp ./vpm $(PREFIX_BIN)/vpm cp ./vbm $(PREFIX_BIN)/vbm
cp ./bash-completion/completions/vpm $(PREFIX_BASHC)/vpm cp ./bash-completion/completions/vbm $(PREFIX_BASHC)/vbm
.PHONY: uninstall .PHONY: uninstall
uninstall: uninstall:
rm -f $(PREFIX_BIN)/vpm rm -f $(PREFIX_BIN)/vbm
rm -f $(PREFIX_BASHC)/vpm rm -f $(PREFIX_BASHC)/vbm
.PHONY: check .PHONY: check
check: check:
which vpm which vbm

View File

@ -1,6 +1,6 @@
# Changed name from vpm to vbm so it can coexist with original, already in void repos... ### Changed name from vpm to vbm so it can coexist with original, already in void repos...
### vbm - An XBPS package management helper for vb-linux and VoidLinux # vbm - An XBPS package management helper for vb-linux and VoidLinux
version 1.3.1 version 1.4.1
`vbm` is a simple to use, daily-driver enhancement to the awesome XBPS (X Binary `vbm` is a simple to use, daily-driver enhancement to the awesome XBPS (X Binary
Package System), initially designed as a helper tool for use with VoidLinux. Package System), initially designed as a helper tool for use with VoidLinux.
@ -14,7 +14,7 @@ That's it.
vbm... vbm...
![vbm](https://codeberg.org/oSoWoSo/vbm/raw/branch/main/screenshots/vbm1.png) ![vbm](https://codeberg.org/oSoWoSo/vbm/raw/branch/main/screenshots/vbm.png)
vbm trying install package but... vbm trying install package but...

File diff suppressed because it is too large Load Diff

View File

@ -1,43 +0,0 @@
source /usr/share/bash-completion/completions/xbps
_vpm()
{
local cur prev words cword
_init_completion || return
local subcommands='sync
update
listrepos
repolist
addrepo
about
filelist
deps
reverse
search
searchfile
list
install
devinstall
listalternatives
setalternative
reconfigure
forceinstall
remove
removerecursive
cleanup
autoremove
help
helppager'
local all_pkgs='about|a|filelist|fl|deps|reverse|rv|search|s|install|i|devinstall|di'
local installed_pkgs='listalternatives|la|setalternative|sa|reconfigure|rc|forceinstall|fi|remove|rm|removerecursive|rc'
if [[ $prev == @($1) ]]; then
COMPREPLY=( $( compgen -W "$subcommands" -- "$cur") )
elif [[ $prev == @($all_pkgs) ]]; then
COMPREPLY=( $(compgen -W '$(_xbps_all_packages)' -- "$cur") )
elif [[ $prev == @($installed_pkgs) ]]; then
COMPREPLY=( $(compgen -W '$(_xbps_installed_packages)' -- "$cur") )
fi
} &&
complete -F _vpm vpm

BIN
screenshots/vbm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 330 KiB

After

Width:  |  Height:  |  Size: 330 KiB

View File

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

View File

@ -1 +0,0 @@
test of Gitea personal host

115
vpm → vbm Normal file → Executable file
View File

@ -1,19 +1,22 @@
#!/bin/bash #!/bin/bash
# vim: ft=sh ts=2 sw=2 sts=2 et # vim: ft=sh ts=2 sw=2 sts=2 et
# vpm - void package management utility for # vbm - vb-linux management utility for
# XBPS, the X Binary Package System # XBPS, the X Binary Package System
# Copyright (c) 2016 Armin Jenewein <a@m2m.pm>, GitHub: @netzverweigerer # original author: Armin Jenewein <a@m2m.pm>, GitHub: @netzverweigerer
# Copyright (c) 2019 Dave Eddy <dave@daveeddy.com>, GitHub: @bahamas10 # a lot used from: Dave Eddy <dave@daveeddy.com>, GitHub: @bahamas10
# Copyright (c) 2021 zenobit from oSoWoSo <zen@osowoso.xyz>, codeberg.org: @oSoWoSo # this fork: zenobit from oSoWoSo <pm@osowoso.xyz>, codeberg.org: @oSoWoSo
# For more information about XBPS, see: # For more information about XBPS, see:
# https://github.com/voidlinux/xbps # https://github.com/voidlinux/xbps
# Released under the terms of the GNU general public license, version 3+ # Released under the terms of the GNU general public license, version 3+
# see LICENSE file for license information. # see LICENSE file for license information.
# set version number # set version number
version="1.3.1" version="1.4.1"
# disable verbosity, by default
# verbose=false # enable verbosity, by default
# VPM color definitions verbose=true
# VBM color definitions
numcolorok=2 numcolorok=2
numcolorfail=1 numcolorfail=1
numcolorlogo=5 numcolorlogo=5
@ -24,6 +27,7 @@ numcolorpkgcount=8
numcolordarkgray=11 numcolordarkgray=11
numcolorbrackets=6 numcolorbrackets=6
progname=${0##*/} progname=${0##*/}
# enable or disable colors based on the argument given, i.e.: # enable or disable colors based on the argument given, i.e.:
# setcolors on # colors on # setcolors on # colors on
# setcolors off # colors off # setcolors off # colors off
@ -92,7 +96,7 @@ getlogo () {
"$colorreset" "$colorreset"
} }
# prints a message (with vpm-prefix) # prints a message (with vbm-prefix)
msg () { msg () {
local logo=$(getlogo) local logo=$(getlogo)
local newline=true local newline=true
@ -125,26 +129,24 @@ rmsg () {
banner () { banner () {
echo -n "$colorlogo" echo -n "$colorlogo"
echo ' __ ___ __ _ __ ' echo ' __ __/|__ _ __ '
printf " \\ V / '_ \\ ' \ " printf " \\ V / '_ \\ ' \ "
echo -n "$colorgray" echo -n "$colorgray"
echo " $progname - void package management utility for XBPS" echo " $progname - An XBPS package management helper"
echo -n "$colorlogo" echo -n "$colorlogo"
echo -n ' \_/| .__/_|_|_|' echo -n ' \_/|_,__/_|_|_|'
echo -n "$colorgray" echo -n "$colorgray"
echo ' Source: https://codeberg.org/oSoWoSo/vpm' echo ' Source: https://codeberg.org/oSoWoSo/vbm'
echo -n "$colorlogo" echo -n "$colorlogo"
echo ' |/ '
echo ' ´ '
echo -n "$colorreset" echo -n "$colorreset"
} }
version () { version () {
banner banner
msg "$progname - Version: $version" msg "$progname - Version: $version (GPLv3+)"
msg "Copyright (c) 2016 Armin Jenewein <a@m2m.pm> (GPLv3+)" msg "original author: Armin Jenewein <a@m2m.pm>, GitHub: @netzverweigerer"
msg "zenobit from oSoWoSo <zen@osowoso.xyz>" msg "a lot used from: Dave Eddy <dave@daveeddy.com>, GitHub: @bahamas10"
msg "this fork: zenobit from oSoWoSo <pm@osowoso.xyz>, codeberg.org: @oSoWoSo"
msg "XBPS version: $(xbps-query -v --version | sed 's/GIT: UNSET//')" msg "XBPS version: $(xbps-query -v --version | sed 's/GIT: UNSET//')"
} }
@ -181,14 +183,11 @@ wrapcommand() {
} }
usage () { usage () {
echo
version version
echo
echo -n "$colorheader" echo -n "$colorheader"
echo "USAGE: " echo "USAGE: "
echo -n "$colorgray" echo -n "$colorgray"
echo "$progname [OPTIONS] [SUBCOMMANDS] [<ARGS>]" echo "$progname [OPTIONS] [SUBCOMMANDS] [<ARGS>]"
echo
echo -n "$colorheader" echo -n "$colorheader"
echo "OPTIONS: " echo "OPTIONS: "
echo -n "$colorgray" echo -n "$colorgray"
@ -197,45 +196,52 @@ usage () {
echo "--help-pager - (same as: helppager)" echo "--help-pager - (same as: helppager)"
echo "--show-translations - Show XBPS command translations for $progname sub-commands" echo "--show-translations - Show XBPS command translations for $progname sub-commands"
echo "--verbose - Verbose mode (shows XBPS command translations during execution)" echo "--verbose - Verbose mode (shows XBPS command translations during execution)"
echo
echo -n "$colorheader" echo -n "$colorheader"
echo "SUBCOMMANDS: " echo "SUBCOMMANDS: "
echo -n "$colorgray" echo -n "$colorgray"
echo "help - Show usage information"
echo "helppager (hp) - Show usage information (will pipe output to less/more)"
echo "about (a) <pkg> - Show information about <package>"
t "xbps-query -v -R"
echo "filelist (fl) <pkg> - Show file-list of <package>"
t "xbps-query -v -R -f"
echo "deps (d) <pkg> - Show dependencies for <package>"
t "xbps-query -v -R -x"
echo "reverse (rd) <pkg> - Show reverse dependendies of <package> (see man xbps-query)"
t "xbps-query -v -R -X"
echo "searchmultilib (sm) <name> - Search for package by in all repositories (multilib included) <name>"
t "xbps-query -v -Rs"
echo "search (s) <name> - Search for package by <name> (exclude multilib repo)"
t "xbps-query -v -Rs"
echo "searchfile (sf) <file> - Search for package containing <file> (local)"
t "xbps-query -v -o \"*/$1\""
echo "whatprovides (wp) <file> - Search for package containing <file>"
t "xlocate <pkg>"
echo "list (ls) - List installed packages"
t "xbps-query -v -l"
echo "listw (lw) - List installed packages without their version"
t "xbps-query -l | awk '{ print $2 }' | xargs -n1 xbps-uhelper getpkgname"
echo "listalternatives (la) - List alternative candidates"
t "xbps-alternatives -l"
echo "listrepos (lr) - List configured repositories"
echo "repolist (rl) - Alias for listrepos"
t "xbps-query -v -L"
echo "sync (sy) - Synchronize remote repository data" echo "sync (sy) - Synchronize remote repository data"
t "xbps-install -S" t "xbps-install -S"
echo "update (up) - Update the system" echo "update (up) - Update the system"
t "xbps-install -Suv" t "xbps-install -Suv"
echo "listrepos (lr) - List configured repositories"
echo "repolist (rl) - Alias for listrepos"
t "xbps-query -v -L"
echo "addrepo (ad) <ARGS> - Add an additional repository" echo "addrepo (ad) <ARGS> - Add an additional repository"
t "xbps-install <ARGS>" t "xbps-install <ARGS>"
echo "about (a) <pkg> - Show information about <package>"
t "xbps-query -v -R"
echo "filelist (fl) <pkg> - Show file-list of <package>"
t "xbps-query -v -R -f"
echo "deps <pkg> - Show dependencies for <package>"
t "xbps-query -v -R -x"
echo "reverse (rv) <pkg> - Show reverse dependendies of <package> (see man xbps-query)"
t "xbps-query -v -R -X"
echo "search (s) <name> - Search for package by <name>"
t "xbps-query -v -Rs"
echo "searchfile (sf) <file> - Search for package containing <file> (local)"
t "xbps-query -v -o \"*/$1\""
echo "list (ls) - List installed packages"
t "xbps-query -v -l"
echo "install (i) <pkg(s)> - Install <package(s)>" echo "install (i) <pkg(s)> - Install <package(s)>"
t "xbps-install" t "xbps-install"
echo "devinstall (di) <pkg(s)> - Install <package> (and corresponding <package>-devel package(s))" echo "devinstall (di) <pkg(s)> - Install <package> (and corresponding <package>-devel package(s))"
t "xbps-install <package> <package>-devel" t "xbps-install <package> <package>-devel"
echo "listalternatives (la) - List alternative candidates"
t "xbps-alternatives -l"
echo "setalternative (sa) <pkg(s) - Set alternative for <package>"
t "xbps-alternatives -s"
echo "reconfigure (rc) <pkg> - Re-configure installed <package>" echo "reconfigure (rc) <pkg> - Re-configure installed <package>"
t "xbps-reconfigure -v" t "xbps-reconfigure -v"
echo "forceinstall (fi) <pkg(s)> - Force installation of <package(s)>" echo "forceinstall (fi) <pkg(s)> - Force installation of <package(s)>"
t "xbps-install -f" t "xbps-install -f"
echo "setalternative (sa) <pkg(s) - Set alternative for <package>"
t "xbps-alternatives -s"
echo "remove (rm) <package(s)) - Remove <package(s)> from the system" echo "remove (rm) <package(s)) - Remove <package(s)> from the system"
t "xbps-remove -v " t "xbps-remove -v "
echo "removerecursive (rr) <pkg(s)> - Recursively remove package(s) (and its dependencies)" echo "removerecursive (rr) <pkg(s)> - Recursively remove package(s) (and its dependencies)"
@ -244,11 +250,6 @@ usage () {
t "xbps-remove -v -O" t "xbps-remove -v -O"
echo "autoremove (ar) - Remove orphaned packages" echo "autoremove (ar) - Remove orphaned packages"
t "xbps-remove -v -o" t "xbps-remove -v -o"
echo "whatprovides (wp) <file> - Search for package containing <file>"
t "xlocate <pkg>"
echo "help - Show usage information"
echo "helppager (hp) - Show usage information (will pipe output to less/more)"
echo
echo -n "$colorheader" echo -n "$colorheader"
echo "XBPS COMPATIBILITY COOLNESS:" echo "XBPS COMPATIBILITY COOLNESS:"
echo -n "$colorgray" echo -n "$colorgray"
@ -257,7 +258,6 @@ usage () {
echo -n "Example: " echo -n "Example: "
selected=${f[$RANDOM % ${#f[@]}]} selected=${f[$RANDOM % ${#f[@]}]}
echo "$progname ${selected##*-} <ARGS> - see also: /usr/sbin/xbps-*" echo "$progname ${selected##*-} <ARGS> - see also: /usr/sbin/xbps-*"
echo
echo -n "$colorreset" echo -n "$colorreset"
} }
@ -318,11 +318,11 @@ case "$cmd" in
wrapcommand xbps-query -v -R -f "$@" wrapcommand xbps-query -v -R -f "$@"
;; ;;
deps|dep|dependencies) deps|dep|dependencies|d)
wrapcommand xbps-query -v -R -x "$@" wrapcommand xbps-query -v -R -x "$@"
;; ;;
reverse|rv) reverse|rd)
msg -n "Reverse dependencies for $* " msg -n "Reverse dependencies for $* "
wrapcommand xbps-query -v -R -X "$@" wrapcommand xbps-query -v -R -X "$@"
;; ;;
@ -358,6 +358,10 @@ case "$cmd" in
done < <(xbps-query -v -l) done < <(xbps-query -v -l)
;; ;;
listw|lw)
xbps-query -l | awk '{ print $2 }' | xargs -n1 xbps-uhelper getpkgname
;;
listalternative|listalternatives|la) listalternative|listalternatives|la)
wrapcommand xbps-alternatives -l "$@" wrapcommand xbps-alternatives -l "$@"
;; ;;
@ -533,9 +537,14 @@ case "$cmd" in
xcheckrestart xcheckrestart
;; ;;
searchmultilib|sm)
msg -n "Searching for: $* "
wrapcommand xbps-query -v -Rs "$*"
;;
search|s) search|s)
msg -n "Searching for: $* " msg -n "Searching for: $* "
wrapcommand xbps-query -v -Rs "$@" wrapcommand xbps-query -v -Rs "$*" | grep -v 32bit
;; ;;
cleanup|clean|cl) cleanup|clean|cl)