-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
26 lines (20 loc) · 840 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
#!/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 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/lachieh/dotfiles.git'"
else
eval "$(/opt/homebrew/bin/brew shellenv)"
(echo '🚀 Downloading dotfiles with:' && chezmoi init https://github.com/lachieh/dotfiles.git)
fi
echo ""
echo "Done."