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
install:
cp ./vpm $(PREFIX_BIN)/vpm
cp ./bash-completion/completions/vpm $(PREFIX_BASHC)/vpm
cp ./vbm $(PREFIX_BIN)/vbm
cp ./bash-completion/completions/vbm $(PREFIX_BASHC)/vbm
.PHONY: uninstall
uninstall:
rm -f $(PREFIX_BIN)/vpm
rm -f $(PREFIX_BASHC)/vpm
rm -f $(PREFIX_BIN)/vbm
rm -f $(PREFIX_BASHC)/vbm
.PHONY: 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...
### vbm - An XBPS package management helper for vb-linux and VoidLinux
version 1.3.1
### 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
version 1.4.1
`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.
@ -14,7 +14,7 @@ That's it.
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...

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
# 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
# Copyright (c) 2016 Armin Jenewein <a@m2m.pm>, GitHub: @netzverweigerer
# Copyright (c) 2019 Dave Eddy <dave@daveeddy.com>, GitHub: @bahamas10
# Copyright (c) 2021 zenobit from oSoWoSo <zen@osowoso.xyz>, codeberg.org: @oSoWoSo
# original author: Armin Jenewein <a@m2m.pm>, GitHub: @netzverweigerer
# a lot used from: Dave Eddy <dave@daveeddy.com>, GitHub: @bahamas10
# this fork: zenobit from oSoWoSo <pm@osowoso.xyz>, codeberg.org: @oSoWoSo
# For more information about XBPS, see:
# https://github.com/voidlinux/xbps
# Released under the terms of the GNU general public license, version 3+
# see LICENSE file for license information.
# set version number
version="1.3.1"
# disable verbosity, by default
# verbose=false
# VPM color definitions
version="1.4.1"
# enable verbosity, by default
verbose=true
# VBM color definitions
numcolorok=2
numcolorfail=1
numcolorlogo=5
@ -24,6 +27,7 @@ numcolorpkgcount=8
numcolordarkgray=11
numcolorbrackets=6
progname=${0##*/}
# enable or disable colors based on the argument given, i.e.:
# setcolors on # colors on
# setcolors off # colors off
@ -92,7 +96,7 @@ getlogo () {
"$colorreset"
}
# prints a message (with vpm-prefix)
# prints a message (with vbm-prefix)
msg () {
local logo=$(getlogo)
local newline=true
@ -125,26 +129,24 @@ rmsg () {
banner () {
echo -n "$colorlogo"
echo ' __ ___ __ _ __ '
echo ' __ __/|__ _ __ '
printf " \\ V / '_ \\ ' \ "
echo -n "$colorgray"
echo " $progname - void package management utility for XBPS"
echo " $progname - An XBPS package management helper"
echo -n "$colorlogo"
echo -n ' \_/| .__/_|_|_|'
echo -n ' \_/|_,__/_|_|_|'
echo -n "$colorgray"
echo ' Source: https://codeberg.org/oSoWoSo/vpm'
echo ' Source: https://codeberg.org/oSoWoSo/vbm'
echo -n "$colorlogo"
echo ' |/ '
echo ' ´ '
echo -n "$colorreset"
}
version () {
banner
msg "$progname - Version: $version"
msg "Copyright (c) 2016 Armin Jenewein <a@m2m.pm> (GPLv3+)"
msg "zenobit from oSoWoSo <zen@osowoso.xyz>"
msg "$progname - Version: $version (GPLv3+)"
msg "original author: Armin Jenewein <a@m2m.pm>, GitHub: @netzverweigerer"
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//')"
}
@ -181,14 +183,11 @@ wrapcommand() {
}
usage () {
echo
version
echo
echo -n "$colorheader"
echo "USAGE: "
echo -n "$colorgray"
echo "$progname [OPTIONS] [SUBCOMMANDS] [<ARGS>]"
echo
echo -n "$colorheader"
echo "OPTIONS: "
echo -n "$colorgray"
@ -197,45 +196,52 @@ usage () {
echo "--help-pager - (same as: helppager)"
echo "--show-translations - Show XBPS command translations for $progname sub-commands"
echo "--verbose - Verbose mode (shows XBPS command translations during execution)"
echo
echo -n "$colorheader"
echo "SUBCOMMANDS: "
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"
t "xbps-install -S"
echo "update (up) - Update the system"
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"
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)>"
t "xbps-install"
echo "devinstall (di) <pkg(s)> - Install <package> (and corresponding <package>-devel package(s))"
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>"
t "xbps-reconfigure -v"
echo "forceinstall (fi) <pkg(s)> - Force installation of <package(s)>"
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"
t "xbps-remove -v "
echo "removerecursive (rr) <pkg(s)> - Recursively remove package(s) (and its dependencies)"
@ -244,11 +250,6 @@ usage () {
t "xbps-remove -v -O"
echo "autoremove (ar) - Remove orphaned packages"
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 "XBPS COMPATIBILITY COOLNESS:"
echo -n "$colorgray"
@ -257,7 +258,6 @@ usage () {
echo -n "Example: "
selected=${f[$RANDOM % ${#f[@]}]}
echo "$progname ${selected##*-} <ARGS> - see also: /usr/sbin/xbps-*"
echo
echo -n "$colorreset"
}
@ -318,11 +318,11 @@ case "$cmd" in
wrapcommand xbps-query -v -R -f "$@"
;;
deps|dep|dependencies)
deps|dep|dependencies|d)
wrapcommand xbps-query -v -R -x "$@"
;;
reverse|rv)
reverse|rd)
msg -n "Reverse dependencies for $* "
wrapcommand xbps-query -v -R -X "$@"
;;
@ -358,6 +358,10 @@ case "$cmd" in
done < <(xbps-query -v -l)
;;
listw|lw)
xbps-query -l | awk '{ print $2 }' | xargs -n1 xbps-uhelper getpkgname
;;
listalternative|listalternatives|la)
wrapcommand xbps-alternatives -l "$@"
;;
@ -533,9 +537,14 @@ case "$cmd" in
xcheckrestart
;;
searchmultilib|sm)
msg -n "Searching for: $* "
wrapcommand xbps-query -v -Rs "$*"
;;
search|s)
msg -n "Searching for: $* "
wrapcommand xbps-query -v -Rs "$@"
wrapcommand xbps-query -v -Rs "$*" | grep -v 32bit
;;
cleanup|clean|cl)