-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathup-up.fish
55 lines (47 loc) · 1.4 KB
/
up-up.fish
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
begin
set R '🚀'
set G '🔍'
function title_underscore -a message
echo -n (string repeat -n (string length --visible $message) '─')
end
function section_title_update -a section
set message "$R Updating $section"
echo -se \
(set_color $fish_color_cwd) \
"$message\n" \
(title_underscore $message) \
(set_color normal)
end
function section_title_check -a section
set message "$G Checking $section"
echo -se \
(set_color $fish_color_escape) \
"$message\n" \
(title_underscore $message) \
(set_color normal)
end
function up-up \
-d 'Updates macOS software, Homebrew, mise-en-place, and Python packages'
if contains -- --all $argv
section_title_update 'macOS software'
soft-up
else
section_title_check 'macOS software'
soft-up --check-only
end
echo -ne "\n"
section_title_update 'Homebrew packages'
brew-up
echo -ne "\n"
if contains -- --all $argv
section_title_update 'mise-en-place packages'
mise-up
else
section_title_check 'mise-en-place packages'
mise-up --check-only
end
echo -ne "\n"
section_title_update 'Python packages'
pip-up
end
end