-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·76 lines (55 loc) · 2.06 KB
/
install
File metadata and controls
executable file
·76 lines (55 loc) · 2.06 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
#!/usr/bin/env bash
echo "Setting up your Mac..."
DOTFILES=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# Check if Xcode Command Line Tools are installed
if ! xcode-select -p &>/dev/null; then
echo "Xcode Command Line Tools not found. Installing..."
xcode-select --install
else
echo "Xcode Command Line Tools already installed."
fi
# Check for Oh My Zsh and install if we don't have it
if [ ! -d "$HOME/.oh-my-zsh" ]; then
/bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/HEAD/tools/install.sh)"
fi
# Check for Homebrew and install if we don't have it
if test ! "$(which brew)"; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# Removes .zshrc from $HOME (if it exists) and symlinks the .zshrc file from the .dotfiles
rm -rf $HOME/.zshrc
ln -sw $DOTFILES/zsh/.zshrc $HOME/.zshrc
# Removes .p10k.zsh theme file from $HOME (if it exists) and symlinks the .p10k.zsh file from the .dotfiles
rm -rf $HOME/.p10k.zsh
ln -sw $DOTFILES/zsh/.p10k.zsh $HOME/.p10k.zsh
# remove and link .hushlogin
rm -rf $HOME/.hushlogin
ln -sw $DOTFILES/.hushlogin $HOME/.hushlogin
# Tmux
ln -sf $DOTFILES/tmux/tmux.conf $HOME/.tmux.conf
# Scripts
mkdir -p $HOME/.local/bin
ln -sf $DOTFILES/scripts/t $HOME/.local/bin/t
# NVIM
rm -rf $HOME/.config/nvim
ln -sw $DOTFILES/nvim $HOME/.config/nvim
# Update Homebrew
brew update
# Install all our dependencies with bundle (See Brewfile)
brew bundle --file ./homebrew/Brewfile
# NVM (Node Version Manager)
mkdir -p $HOME/.nvm
ln -sf $DOTFILES/nvm/default-packages $HOME/.nvm/default-packages
# Lazygit
mkdir -p $HOME/.config/lazygit
ln -sf $DOTFILES/lazygit/config.yml $HOME/.config/lazygit/config.yml
# Editorconfig
ln -sf $DOTFILES/.editorconfig $HOME/.editorconfig
# Tmux Plugin Manager
if [ ! -d "$HOME/.tmux/plugins/tpm" ]; then
git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
fi
# Create a projects directories
mkdir -p $HOME/Code