-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvoidup
More file actions
executable file
·91 lines (78 loc) · 2.39 KB
/
voidup
File metadata and controls
executable file
·91 lines (78 loc) · 2.39 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/sh
style () {
local text="$1"
local brdr="$2"
shift 2
gum style \
--foreground="$text" \
--border="rounded" \
--border-foreground="$brdr" \
"$@"
}
pupdate () {
style 13 12 " updating python packages with pipx: "
pipx upgrade-all \
&& style 12 13 " python pkg updates successful " \
|| style 12 13 " python pkg updates failed "
}
rupdate () {
style 12 11 " updating rust packages with cargo: "
cargo install-update -a \
&& style 11 12 " rust pkg updates successful " \
|| style 11 12 " rust pkg updates failed "
}
gupdate () {
style 11 10 " updating go packages with gup: "
gup update \
&& style 10 11 " go pkg updates successful " \
|| style 10 11 " go pkg updates failed "
}
style 10 11 " updating void linux "
style 12 11 " running system upgrade... "
doas xbps-install -Su
style 11 10 " cleaning orphaned packages... "
doas xbps-remove -o
style 10 9 " updating source tree... "
cd $HOME/.local/share/void-packages
git checkout master
git pull
setsid -f herbe " void updated. "
echo
while true; do
choice=$(
gum choose \
--header="update lanugage build system packages?" \
--cursor="- " \
--header.foreground=10 \
--cursor.foreground=9 \
--item.foreground=13 \
"yes" "no" "py" "rs" "go"
)
case "$choice" in
yes)
style 14 9 " beginning language package updater. "
sleep 1
pupdate
rupdate
gupdate
style 9 14 " language packages updated. "
break
;;
no)
style 10 11 " bye! "
break
;;
py)
pupdate
;;
rs)
rupdate
;;
go)
gupdate
;;
*)
style 7 8 " invalid response. "
;;
esac
done