-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
executable file
·32 lines (24 loc) · 1006 Bytes
/
install.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
#!/bin/bash
set -eufo pipefail
echo ""
echo "🤚 This script will setup .dotfiles for you."
read -n 1 -r -s -p $' Press any key to continue or Ctrl+C to abort...\n\n'
# Install Homebrew
command -v brew >/dev/null 2>&1 || \
(echo '🍺 Installing Homebrew' && /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)")
# Install Oh My Zsh
if [ ! -f ~/.oh-my-zsh/oh-my-zsh.sh ]; then
(echo '💰 Installing oh-my-zsh' && yes | sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)")
fi
# Install chezmoi
command -v chezmoi >/dev/null 2>&1 || \
(echo '👊 Installing chezmoi' && brew install chezmoi)
if [ -d "$HOME/.local/share/chezmoi/.git" ]; then
echo "🚸 chezmoi already initialized"
echo " Reinitialize with: 'chezmoi init https://github.com/chimurai/dotfiles.git'"
else
echo "🚀 Initialize dotfiles with:"
echo " chezmoi init https://github.com/chimurai/dotfiles.git"
fi
echo ""
echo "Done."