forked from dipshit/dotify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·108 lines (88 loc) · 2.92 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·108 lines (88 loc) · 2.92 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/usr/bin/env zsh
source resources.sh
bot "hello! welcome to your new computer"
bot "let's get going! "
bot "installing osx command line tools"
xcode-select --install
# set computer info
set_computer_info
# homebrew
if [ -x /usr/local/bin/brew ];
then
running "Skipping install of brew. It is already installed.";
running "Updating brew..."
brew update;
running "Updated brew."
ok
else
running "installing brew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
if [[ $? != 0 ]]; then
error "unable to install homebrew -> quitting setup"
exit 2
fi
ok
fi
running "Running brew bundle...";
brew bundle;
if [[ $? != 0 ]]; then
error "brew bundle could not complete"
exit 2
fi
ok "brew bundle complete";
export GOPATH=$HOME
mkdir -p $GOPATH/src $GOPATH/pkg $GOPATH/bin
# setup rbenv & install ruby
RUBY_VERSION=2.7.0
echo "🦄 ruby" $RUBY_VERSION
running "rbenv install ruby:$RUBY_VERSION"
rbenv install -s $RUBY_VERSION
rbenv global $RUBY_VERSION
ok rbenv
running "npm settings"
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
ok npm-settings
running "downloading oh-my-zsh"
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
ok oh-my-zsh
running "installing zsh-autosuggestions"
git clone https://github.com/zsh-users/zsh-autosuggestions.git \
~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
ok
running "installing zsh-history-substring-search"
git clone https://github.com/zsh-users/zsh-history-substring-search \
~/.oh-my-zsh/custom/plugins/zsh-history-substring-search
ok
running "installing zsh-fast-syntax-highlighting"
git clone https://github.com/zdharma/fast-syntax-highlighting.git \
~/.oh-my-zsh/custom/plugins/fast-syntax-highlighting
ok
running "installing zsh-you-should-use"
git clone https://github.com/MichaelAquilina/zsh-you-should-use.git \
~/.oh-my-zsh/custom/plugins/you-should-use
ok
running "installing zsh-plugins-autoupdate"
git clone https://github.com/TamCore/autoupdate-oh-my-zsh-plugins.git \
~/.oh-my-zsh/custom/plugins/autoupdate
ok
# running "downloading Argonaut.itermcolors"
# wget --quiet https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Argonaut.itermcolors -P ~/Downloads/
# wget --quiet https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/terminal/Argonaut.terminal -P ~/Downloads/
# ok "Argonaut.itermcolors"
bot "setting zsh as the user shell"
CURRENTSHELL=$(dscl . -read /Users/$USER UserShell | awk '{print $2}')
if [[ "$CURRENTSHELL" != "/usr/local/bin/zsh" ]]; then
bot "setting newer homebrew zsh (/usr/local/bin/zsh) as your shell (password required)"
sudo dscl . -change /Users/$USER UserShell $SHELL /usr/local/bin/zsh > /dev/null 2>&1
ok
fi
symlink_dot_files
running "sourcing zshrc"
source ~/.zshrc
ok
SSH_Keygen
bot "Setup complete"
bot "Add the following sshkey to Github at https://github.com/settings/ssh/new"
cat ~/.ssh/id_ed25519.pub
ok