-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfedora.sh
More file actions
executable file
·76 lines (64 loc) · 1.36 KB
/
fedora.sh
File metadata and controls
executable file
·76 lines (64 loc) · 1.36 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
#!/usr/bin/env bash
set -eu
source ./_common.sh
source ./_brew.sh
OS_ALIAS="fedora"
update_dnf() {
sudo dnf upgrade -y
}
add_docker_dnf_repo() {
sudo dnf config-manager addrepo \
--overwrite \
--from-repofile https://download.docker.com/linux/fedora/docker-ce.repo
}
enable_dnf_ghostty() { sudo dnf copr enable -y scottames/ghostty; }
dnf_install_pkg() {
local items=()
read_package_file_to_array "$OS_ALIAS" items
[[ ${#items[@]} == 0 ]] && return
echo_gray "found ${#items[@]} dnf packages to install"
sudo dnf install -y "${items[@]}"
}
bootstrap() {
update_dnf
add_docker_dnf_repo
enable_dnf_ghostty
dnf_install_pkg
install_brew
update_brew
brew_install_pkg "$OS_ALIAS-brew"
install_or_update_rust
install_or_update_aws_cli_linux
install_or_update_aws_sam_cli_linux
# install_gtk_theme
}
post_config_os() {
add_brew_path_to_session
post_config_linux
link_home "bash/linux.sh" ".bashrc"
link_home "zsh/linux.sh" ".zshrc"
}
do_update() {
update_dnf
update_brew
install_or_update_rust
install_or_update_aws_cli_linux
install_or_update_aws_sam_cli_linux
}
main() {
if should_config; then
pre_config_generic
post_config_os
return
elif should_update; then
do_update
return
elif should_full; then
pre_config_generic
bootstrap
post_config_os
return
fi
}
set_run_mode "$@"
main