-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsudo_setup.zsh
More file actions
97 lines (92 loc) · 3.41 KB
/
sudo_setup.zsh
File metadata and controls
97 lines (92 loc) · 3.41 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
92
93
94
95
96
97
#!/usr/bin/zsh
if [[ 'xdotfiles' != x$(basename ${DOTFILES:=$HOME/dotfiles}) ]]; then
echo "install_base.zsh might not be placed in the right place."
echo "Try running it inside dotfile directory."
exit
fi
source "$DOTFILES/.zshenv"
unset DOTFILES_FUNCTIONS && source "$DOTFILES/functions.zsh"
setopt sh_word_split
if command -v 'apt' &>/dev/null || checkyes 'apt available?'; then
# install_base.zsh dependencies
sudo apt install -y moreutils atool
# python build dependencies (for pyenv)
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git python3-distutils-extra
# nvim dependencies (build latest on my own)
sudo apt install -y ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip curl doxygen
# tmux dependencies (build latest on my own)
sudo apt install -y libevent ncurses libevent-dev ncurses-dev build-essential bison pkg-config
# words (use for spell check)
sudo apt install -y wamerican
fi
if command -v 'pacman' &>/dev/null || checkyes 'pacman available?'; then
use_yay=false
if command -v 'yay' &>/dev/null || checkyes 'install yay via pacman?'; then
use_yay=true
fi
set -xe
alias pacman="sudo pacman --noconfirm --sudoloop"
pacman -Syu
# basics
pacman -S base-devel neofetch git tmux vim curl moreutils atool
# nvim dependencies
pacman -S base-devel cmake unzip ninja tree-sitter curl
# python dependencies
pacman -S base-devel openssl zlib xz tk python python-pip python-virtualenv python-pipenv \
python-gobject python-wxpython python-yaml python-xlib python-utils python-pyopenssl \
poppler-glib python-distutils-extra python-pip python-gobject gtk3 python-cairo libhandy
# texlive
# pacman -S texlive-full
# yay
if [ "$use_yay" = true ]; then
command -v 'yay' &>/dev/null || pacman -S yay
else
error 'yay not found'
exit 1
fi
alias yay="yay --noconfirm --sudoloop"
# utils
yay -S bmon btop
# words
yay -S words
# xdg portals
yay -S xdg-desktop-portal-kde xdg-desktop-portal-gtk xdg-desktop-portal-gnome
# plemol install
yay -S fontforge
# wayland stuffs
yay -S clipboard-sync
# yazi
yay -S yazi ffmpeg 7zip jq poppler fd ripgrep fzf zoxide resvg imagemagick
# delete all cache
pacman -Scc
yay -Scc
set +xe
fi
if command -v 'brew' &>/dev/null; then
brew bundle --file "$DOTFILES/config/brewfile/Brewfile"
# basics
brew install wget moreutils automake git gnupg \
coreutils findutils gnu-indent gnu-sed gnutls grep gnu-tar gawk
# neovim
xcode-select --install
brew install ninja cmake gettext curl tree
# lua
brew install luajit luarocks the_silver_searcher
# apps
brew install tmux htop btop gh lynx ffmpeg gemini-cli ghostscript jq imagemagick k9s
# database
brew install mysql-client [email protected] [email protected] snowflake-cli
# protobuf
brew install protobuf grpcui grpcurl
# fonts
brew install --cask font-plemol-jp
brew install --cask font-plemol-jp-nf
brew install --cask font-plemol-jp-hs
# yabai and skhd
brew install koekeishiya/formulae/yabai
brew install koekeishiya/formulae/skhd
brew install sleepwatcher
# yazi
brew install yazi ffmpeg-full sevenzip jq poppler fd ripgrep fzf zoxide resvg imagemagick-full font-symbols-only-nerd-font
brew link ffmpeg-full imagemagick-full -f --overwrite
fi