-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·62 lines (50 loc) · 1.31 KB
/
setup.sh
File metadata and controls
executable file
·62 lines (50 loc) · 1.31 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
#!/bin/bash
# Check inputs
email_regex="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$"
if [[ -n "$1" && "$1" =~ $email_regex ]]; then
echo "Supplied email: $1"
else
echo "\nPlease supply a valid email address.\n"
exit
fi
if [ "$2" = "-w" ]; then
HOMEBREW_FILE="homebrew-work.sh"
echo "Installing Work Apps"
else
HOMEBREW_FILE="homebrew.sh"
echo "Installing Personal Apps"
fi
set -euo pipefail
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
echo 'Installing oh-my-zsh & powerline fonts'
## Install oh-my-zsh
rm -rf ~/.oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
#
## Install powerline fonts
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts
echo 'Linking zshrc'
ln -nfs "$DIR/zshrc" ~/.zshrc
ln -nfs "$DIR/zshenv" ~/.zshenv
ln -nfs "$DIR/my-theme.zsh-theme" ~/.oh-my-zsh/themes/my-theme.zsh-theme
echo 'Loading zsh'
zsh
source $HOME/.zshrc
# Add git configs
echo 'Configuring Git'
sh "$DIR/git/install.sh"
# Install apps
echo 'Installing homebrew & apps'
sh "$DIR/$HOMEBREW_FILE"
# Install nvm
echo 'Installing nvm'
sh "$DIR/nvm.sh"
# Linking angular/yarn
#echo 'Linking angular-cli.json'
#ln -nfs "$DIR/angular-cli.json" ~/.angular-cli.json