forked from ryanb/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate
49 lines (44 loc) · 1.67 KB
/
update
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
#!/usr/bin/env zsh
#echo "updating system rubygems"
#cd ~/
#sudo gem update --system
#sudo gem clean
echo "Updating ruby"
source $(brew --prefix chruby)/share/chruby/chruby.sh
source $(brew --prefix chruby)/share/chruby/auto.sh
cd ~/development
ruby_latest_version="$(curl -q -s https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/stable.txt | tail -1)"
ruby_current_version="$(cat .ruby-version)"
if [[ $ruby_latest_version = $ruby_current_version ]]; then
echo "Latest ruby installed - Updating rubygems"
gem update --system
gem update bundler
gem clean
else
ruby-install "ruby $ruby_latest_version"
rm -rf ~/src
rm -rf ~/.rubies/ruby-$ruby_current_version
echo "$ruby_latest_version" > .ruby-version
source $(brew --prefix chruby)/share/chruby/chruby.sh
source $(brew --prefix chruby)/share/chruby/auto.sh
cd ~/development
gem update --system
gem install bundler --no-document
gem clean
fi
cd ~/
echo "updating zsh completions"
wget https://raw.githubusercontent.com/docker/docker/master/contrib/completion/zsh/_docker -O ~/.zsh/completions/_docker
wget https://raw.githubusercontent.com/docker/machine/master/contrib/completion/zsh/_docker-machine -O ~/.zsh/completions/_docker-machine
wget https://raw.githubusercontent.com/docker/compose/master/contrib/completion/zsh/_docker-compose -O ~/.zsh/completions/_docker-compose
rm ~/.zcompdump*
echo "homebrew outdated"
cd ~/
wget https://raw.githubusercontent.com/damonmorgan/environment/master/Brewfile -O ~/Brewfile
brew bundle --verbose
brew update
brew cleanup
brew cask cleanup
brew outdated
echo "npm outdated"
npm -g outdated