-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbootstrap.sh
More file actions
64 lines (51 loc) · 2.1 KB
/
bootstrap.sh
File metadata and controls
64 lines (51 loc) · 2.1 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
#!/usr/bin/env bash
# --------------–-------–--------–--------–-------–--–-----
# Prerequisites
# --------------–-------–--------–--------–-------–--–-----
sudo -v # Ask for admin upfront
echo "→ Installing Xcode Command Line Tools..."
xcode-select --install
echo "✓ Xcode OK."
if test ! $(which brew)
then
echo " → Installing Homebrew for package management..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
brew update
brew upgrade
echo "✓ Homebrew OK."
echo "→ Downloading dotfiles into user folder..."
git clone https://github.com/diessica/dotfiles.git ~/dotfiles
cd ~/dotfiles
echo "✓ dotfiles download OK."
# --------------–-------–--------–--------–-------–--–-----
# CLI/GUI apps and fonts
# --------------–-------–--------–--------–-------–--–-----
echo "→ Installing packages from brew..."
brew install $(cat brew/brewfile|grep -v "#")
echo "✓ fonts and CLI/GUI apps OK."
echo "→ Configuring git..."
ln -s ~/dotfiles/git/config ~/.gitconfig
ln -s ~/dotfiles/git/ignore_global ~/.gitignore_global
# Add personal information in your .gitlocal, not .gitconfig!
echo "✓ git configuration OK."
echo "→ Configuring fish shell..."
echo '/opt/homebrew/bin/fish' | sudo tee -a /etc/shells > /dev/null
chsh -s /opt/homebrew/bin/fish # Set Fish as default shell
ln -sf ~/dotfiles/fish/config.fish ~/.config/fish/config.fish
ln -sf ~/dotfiles/fish/utils ~/.config/fish/functions/custom
ln -sf ~/dotfiles/fish/fishfile ~/.config/fish/fishfile
fish # Switch to fish
fisher install $(cat fish/fishfile) # Install fish plugins
echo "✓ fish shell OK."
echo "→ Configuring kitty..."
ln -s ~/dotfiles/misc/kitty.conf ~/.config/kitty/kitty.conf
echo "✓ kitty terminal OK."
echo "→ Configuring ssh..."
ln -s ~/dotfiles/git/ssh-config ~/.ssh/config
echo "✓ ssh OK."
# --------------–-------–--------–--------–-------–--–-----
# macOS settings
# --------------–-------–--------–--------–-------–--–-----
echo "→ Setting macOS defaults... (It'll shut down Terminal, bye!)"
sh misc/macos