-
Notifications
You must be signed in to change notification settings - Fork 0
/
gvpm
executable file
·64 lines (57 loc) · 2.71 KB
/
gvpm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/bash
# Author: zenobit
# Description: Uses gum to provide a simple TUI
# License MIT
xbps-query -l | wc -l
echo "#TODO headers and solve sudo"
header() {
header1=$(gum style --padding '0 1' --border rounded --border-foreground "#0BC51A" \
" __ ___ __ _ __
\ V / '_ \ ' \ vpm - void package management utility for XBPS
\_/| .__/_|_|_| GitHub: https://github.com/netzverweigerer/vpm
|/
´
[vpm] vpm - Version: UNKNOWN
[vpm] Copyright (c) 2016 Armin Jenewein <[email protected]> (GPLv3+)
[vpm] XBPS version: XBPS: 0.59.1 API: 20200221")
header2=$(gum style --padding '0 1' --border rounded --border-foreground "#295340" \
"XBPS_DISTDIR $XBPS_DISTDIR
repo: $MY_XBPS_REPO
branch: $(git branch | grep '*')
PR: $pr_number
$(gum style --foreground "#295340" "Heeelp")")
header3=$(gum style --padding '0 1' --border rounded --border-foreground "#295340" \
" My packages:
$(xmypkgs "$email")")
header23=$(gum join --align top "$header2" "$header3")
gum join --vertical "$header1" "$header23"
}
header
choice=$(echo \
"sync - Synchronize remote repository data
update (up) - Update the system
listrepos (lr) - List configured repositories
repolist (rl) - Alias for listrepos
addrepo (ar) <ARGS> - Add an additional repository
info <pkg> - Show information about <package>
filelist (fl) <pkg> - Show file-list of <package>
deps <pkg> - Show dependencies for <package>
reverse (rv) <pkg> - Show reverse dependendies of <package> (see man xbps-query)
search (s) <name> - Search for package by <name>
searchfile (sf) <file> - Search for package containing <file> (local)
list (ls) - List installed packages
install (i) <pkg(s)> - Install <package(s)>
devinstall (di) <pkg(s)> - Install <package> (and corresponding <package>-devel package(s))
listalternatives (la) - List alternative candidates
setalternative (sa) <pkg(s) - Set alternative for <package>
reconfigure (rc) <pkg> - Re-configure installed <package>
forceinstall (fi) <pkg(s)> - Force installation of <package(s)>
remove <package(s)) - Remove <package(s)> from the system
removerecursive <pkg(s)> - Recursively remove package(s) (and its dependencies)
cleanup (cl) - Clean up cache directory
autoremove (ar) - Remove orphaned packages
whatprovides (wp) <file> - Search for package containing <file>
help - Show usage information
helppager (hp) - Show usage information (will pipe output to less/more)" \
| gum filter --header "Action..." --height 25)
vpm $(echo ${choice} | cut -d' ' -f1)