-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·135 lines (122 loc) · 3.51 KB
/
setup.sh
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/bin/bash
set -xeuo pipefail
DOTFILES_DIRECTORY="$(dirname $(realpath ${BASH_SOURCE[0]}))"
install-git-conf() {
mkdir -p "$HOME/.config/git"
ln -sf "$DOTFILES_DIRECTORY/git/config" "$HOME/.config/git/config"
ln -sf "$DOTFILES_DIRECTORY/git/ignore" "$HOME/.config/git/ignore"
}
install-fish-conf() {
mkdir -p "$HOME/.config/fish"
ln -sf "$DOTFILES_DIRECTORY/fish/config.fish" "$HOME/.config/fish/config.fish"
}
intall-mise-conf() {
mkdir -p "$HOME/.config/mise"
ln -sf "$DOTFILES_DIRECTORY/mise/.default-python-packages" "$HOME/.default-python-packages"
ln -sf "$DOTFILES_DIRECTORY/mise/.default-gems" "$HOME/.default-gems"
ln -sf "$DOTFILES_DIRECTORY/mise/.default-npm-packages" "$HOME/.default-npm-packages"
ln -sf "$DOTFILES_DIRECTORY/mise/.default-go-packages" "$HOME/.default-go-packages"
ln -sf "$DOTFILES_DIRECTORY/mise/config.toml" "$HOME/.config/mise/config.toml"
ln -sf "$DOTFILES_DIRECTORY/mise/settings.toml" "$HOME/.config/mise/settings.toml"
}
install-starship-conf() {
mkdir -p "$HOME/.config"
ln -sf "$DOTFILES_DIRECTORY/starship/starship.toml" "$HOME/.config/starship.toml"
}
install-wezterm-conf() {
mkdir -p "$HOME/.config/wezterm"
ln -sf "$DOTFILES_DIRECTORY/wezterm/wezterm.lua" "$HOME/.config/wezterm/wezterm.lua"
}
install-tridactyl-conf() {
mkdir -p "$HOME/.config/tridactyl"
mkdir -p "$HOME/.config/tridactyl/js"
mkdir -p "$HOME/.config/tridactyl/themes"
for path in $(find tridactyl -type f); do
ln -sf "$DOTFILES_DIRECTORY/$path" "$HOME/.config/$path"
done
}
setup-brew() {
if [ ! -e /opt/homebrew/bin/brew ]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
eval "$(/opt/homebrew/bin/brew shellenv)"
brew upgrade
brew install --cask \
1password \
firefox \
google-chrome \
wezterm \
visual-studio-code \
docker \
aws-vault \
session-manager-plugin \
google-cloud-sdk \
jetbrains-toolbox \
raycast \
slack \
homebrew/cask-fonts/font-jetbrains-mono \
google-japanese-ime
brew install \
fish \
gh \
ghq \
lazygit \
starship \
docker-compose \
zoxide \
mise \
watchexec \
1password-cli \
eza \
bat \
difftastic \
git-delta \
ripgrep \
fd \
pueue \
broot \
sd \
sk \
jq \
jless \
gron \
jc \
pup \
mdcat \
csview \
pandoc \
graphviz \
hexyl \
ouch \
xh \
k6 \
mitmproxy \
mysql \
postgresql@14 \
sqldef/sqldef/mysqldef \
sqldef/sqldef/psqldef \
redis \
ffmpeg \
mpv \
sox \
awscli \
awscurl \
scrcpy \
yt-dlp
}
if [ "$(uname)" == "Darwin" ]; then
install-git-conf
install-fish-conf
intall-mise-conf
install-starship-conf
install-wezterm-conf
install-tridactyl-conf
setup-brew
elif uname -a | grep 'Linux kali' >/dev/null; then
sudo apt update -y
sudo apt install -y fish
curl -fsSL https://starship.rs/install.sh | env FORCE=1 sh
curl -fsSL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
curl https://mise.jdx.dev/install.sh | sh
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
fi