-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.sh
executable file
·34 lines (26 loc) · 1.23 KB
/
bootstrap.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
33
34
#!/usr/bin/env bash
# First, verify assumptions about current state of the system are true. This
# script should not run on a system that has already been bootstrapped. However,
# if you're switching to these dotfiles after having already installed VS Code,
# then bootstrapping is a destructive action, so handle this manually.
if [ -d ~/bin ]; then
echo "ERROR: ~/bin already exists, so you’ll need to delete it, then re-run."
exit 1
fi
if [ -d ~/.vscode ]; then
echo "ERROR: ~/.vscode already exists, so you’ll need to delete it, then re-run."
exit 1
fi
# Create an empty secrets file
touch ~/Developer/dotfiles/zsh/secrets
# Suppress login message of the day (MOTD) so that Terminal does not say
# things like "Last login: Mon Aug 9 12:54:47 on ttys015" every time you
# open a new window or tab (https://stackoverflow.com/a/20303502).
touch ~/.hushlogin
# Sync preferences and packages for across machines
ln -s ~/Dropbox/Apps/Code ~/.vscode
# Create a symlink from ~/bin to ~/Developer/dotfiles, which puts the dotfiles
# project's various scripts on the PATH so they can be run from anywhere.
ln -s ~/Developer/dotfiles ~/bin
# Setup Zsh to use the dotfiles project's .zshrc file.
echo 'source ~/Developer/dotfiles/zshrc' >> ~/.zshrc