forked from CoreyMSchafer/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·53 lines (40 loc) · 1.45 KB
/
install.sh
File metadata and controls
executable file
·53 lines (40 loc) · 1.45 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
#!/usr/bin/env bash
set -e
############################
# This script creates symlinks from the home directory to any desired dotfiles in ${homedir}/dotfiles
# And also installs Homebrew Packages
# And sets Sublime preferences
############################
if [ "$#" -ne 1 ]; then
echo "Usage: install.sh <home_directory>"
exit 1
fi
homedir=$1
# dotfiles directory
dotfiledir=${homedir}/dotfiles
# list of files/folders to symlink in ${homedir}
files="bashrc bash_profile aliases macos"
# change to the dotfiles directory
echo "Changing to the ${dotfiledir} directory"
cd ${dotfiledir}
echo "...done"
# create symlinks (will overwrite old dotfiles)
for file in ${files}; do
echo "Creating symlink to $file in home directory."
ln -sf ${dotfiledir}/.${file} ${homedir}/.${file}
done
# Download Git Auto-Completion
sh -c "$(curl "https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash" > ${homedir}/.git-completion.bash)"
# Run the Homebrew Script
./brew.sh
# Set brew auto update running on the background
brew autoupdate --start --upgrade --cleanup
# Download and install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" || true
# download and install spaceship theme for oh-my-zsh
npm install -g spaceship-prompt || true
# create .zshrc symlink to dotfiles .zshrc
ln -sf ${dotfiledir}/.zshrc ${homedir}/.zshrc
source ${homedir}/.zshrc
# Run the vscode script
./vscode.sh