-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxbps
More file actions
75 lines (69 loc) · 3.2 KB
/
Copy pathxbps
File metadata and controls
75 lines (69 loc) · 3.2 KB
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
65
66
67
68
69
70
71
72
73
74
75
# XBPS wrapper providing conventional syntax
xbps() {
arg="$1"
shift
case "$arg" in
check | -Mun) xbps-install -Mun ;;
sync | refresh | ref) sudo xbps-install -S ;;
update | upgrade | up | -Su) sudo xbps-install -Su ;;
orphans | orphan | removeorphans) sudo xbps-remove -o ;;
clean | cleancache | wipe) sudo xbps-remove -O ;;
status | -l) xbps-query -l ;;
list | listinstalled | ls) xbps-query -s "" ;;
available | listavailable | la) xbps-query -Rs "" | grep -v "^\[\*" | cut -c 1-$(tput cols) ;;
all | listall | ll) xbps-query -Rs "" ;;
manual | listmanual | lm | -m) xbps-query -m ;;
repos | repo | listrepos | listrepo | repolist | lr | -L) xbps-query -L ;;
install | inst | in | add) test $1 && sudo xbps-install "$@" || echo "ERROR: missing required argument" ;;
reinstall | reinst | re) test $1 && sudo xbps-install -f "$@" || echo "ERROR: missing required argument" ;;
remove | rem | rm | uninstall | uninst | un | delete | del | erase) test $1 && sudo xbps-remove -R "$@" || echo "ERROR: missing required argument" ;;
removeonly | ro) test $1 && sudo xbps-remove "$@" || echo "ERROR: missing required argument" ;;
configure | conf | reconfigure | reconf | cfg) test $1 && sudo xbps-reconfigure -f "$@" || echo "ERROR: missing required argument" ;;
hold) test $1 && sudo xbps-pkgdb -m hold "$@" ; xbps-query -H ;;
unhold) test $1 && sudo xbps-pkgdb -m unhold "$@" ; xbps-query -H ;;
setauto) test $1 && sudo xbps-pkgdb -m auto "$@" || echo "ERROR: missing required argument" ;;
setmanual) test $1 && sudo xbps-pkgdb -m manual "$@" || echo "ERROR: missing required argument" ;;
search | se | -Rs | -sR) xbps-query -Rs "$@" ;;
searchlocal | sl | -s) xbps-query -s $@ ;;
show | details | detail | info | inf | -RS | -SR) xbps-query -RS "$@" || echo "ERROR: not found" ;;
showlocal | -S) xbps-query -S "$@" || echo "ERROR: not found" ;;
files | file | -Rf | -fR) xbps-query -Rf "$@" || echo "ERROR: not found" ;;
fileslocal | filelocal | -f) xbps-query -f "$@" || echo "ERROR: not found" ;;
owns | own | -o) xbps-query -o "$@" ;;
deps | dep | depends | -x) xbps-query -x "$@" || echo "ERROR: not found" ;;
revdeps | revdep | revdepends | rdeps | rdep | rdepends | -X) xbps-query -X "$@" || echo "ERROR: not found" ;;
*) cat << show_usage
$FUNCNAME
check -Mun
sync (ref)
update (up) -Su
orphans
clean
status -l
list (ls)
available (la)
all (ll)
manual (lm) -m
repos (lr) -L
install (in)
reinstall (re)
remove (rm)
removeonly (ro)
configure (cfg)
hold
unhold
setauto
setmanual
search (se) -Rs
searchlocal (sl) -s
show (info) -RS
showlocal -S
files -Rf
fileslocal -f
owns -o
deps -x
revdeps -X
show_usage
xbps-query -V ;;
esac
}