-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_once_after_install_packages.sh.tmpl
executable file
·104 lines (72 loc) · 3.58 KB
/
run_once_after_install_packages.sh.tmpl
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
#!/usr/bin/env bash
function install_cli_app() {
if ! command -v $1 &> /dev/null; then
echo "Installing $1..."
eval $2
else
echo "$1 already installed"
fi
}
function install_app() {
if [ ! -d $2 ]; then
echo "Installing $1..."
eval $3
else
echo "$1 already installed"
fi
}
# install powerlevel10k theme for zsh
if [ ! -d ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k ]; then
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
fi
## GH aliases
gh alias set new --shell --clobber "gh cs ssh -c \`gh cs create -R github/github -b master --devcontainer-path .devcontainer/devcontainer.json -m xLargePremiumLinux --status\`"
gh alias set dev --clobber "cs ssh"
gh alias set tdnew --clobber 'issue -R alondahari/todo create --title "$1" --body ""'
gh alias set dfnew --clobber 'issue -R alondahari/dotfiles create --title "$1" --body "$2"'
gh alias set dfls --clobber 'issue -R alondahari/dotfiles list'
gh alias set dfd --clobber 'issue -R alondahari/dotfiles close $1'
gh alias set dfs --clobber 'issue -R alondahari/dotfiles view $1'
gh alias set ports --shell --clobber 'gh codespace ports --codespace $CODESPACE_NAME'
{{ if .codespaces }}
cp ./lazy_install_codespaces.sh ~/.config/lazy_install.sh
chmod +x ~/.config/lazy_install.sh
echo "export PATH=$PATH:~/.config/tmux/bin" >> ~/.bashrc
install_cli_app "tmux" "sudo apt install -y tmux"
echo "export INSTALL_PATH=$(pwd)" >> ~/.bashrc
{{ else }}
install_cli_app "brew" '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'
install_app "alacritty" "/Applications/Alacritty.App" "brew install --cask alacritty && brew tap homebrew/cask-fonts && brew install font-meslo-lg-nerd-font"
install_cli_app "op" "brew install --cask 1password && brew install --cask 1password/tap/1password-cli"
install_cli_app "tmux" "brew install tmux && brew install reattach-to-user-namespace"
install_cli_app "jq" "brew install jq"
install_cli_app "nvim" "brew install neovim && brew install ripgrep"
if [ ! -d "${HOME}/.nvm/.git" ]; then
"curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && mkdir ~/.nvm && zsh && source ~/.zshrc && nvm install --lts"
fi
# unfortunately we need to specify a version
install_cli_app "psql" "brew install postgresql@14"
install_cli_app "fvm" "brew tap leoafarias/fvm && brew install fvm"
install_app "slack" "/Applications/Slack.app" "brew install --cask slack"
install_app "raycast" "/Applications/Raycast.app" "brew install --cask raycast"
install_cli_app "gps" 'brew tap "uptech/homebrew-oss" && brew install uptech/oss/git-ps-rs'
install_cli_app "alt" "brew install uptech/oss/alt"
install_cli_app "orb" "brew install orbstack"
install_cli_app "aws" "brew install awscli"
install_cli_app "kubectl" "brew install kubectl"
install_cli_app "ngrok" "brew install ngrok/ngrok/ngrok"
install_cli_app "bat" "brew install bat"
install_cli_app "tldr" "brew install tlrc"
install_cli_app "rip" "brew install rm-improved"
install_cli_app "delta" "brew install git-delta"
install_cli_app "difft" "brew install difftastic"
install_cli_app "rbenv" "brew install rbenv ruby-build"
install_cli_app "rustup" "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
# last since it exits the shell
if [ -d ~/.oh-my-zsh ]; then
echo "oh-my-zsh already installed"
else
echo "Installing oh-my-zsh..."
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
{{ end }}