New update script.
This commit is contained in:
parent
ef82099886
commit
b72402e452
@ -36,11 +36,11 @@ alias rm="rm -i"
|
|||||||
# Gzip-enabled `curl`
|
# Gzip-enabled `curl`
|
||||||
#alias gurl="curl --compressed"
|
#alias gurl="curl --compressed"
|
||||||
|
|
||||||
# Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
|
# Software/libraries update
|
||||||
alias update="sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm update npm -g; npm update -g"
|
alias update="source "$HOME/dotfiles/setup/update.sh""
|
||||||
|
|
||||||
# Update dotfiles
|
# Update dotfiles
|
||||||
alias dotfiles="cd "$HOME/dotfiles" && git pull && ./sync.py && cd - > /dev/null 2>&1 && nyan"
|
alias dotfiles="cd "$HOME/dotfiles" && git pull && ./sync.py && . "$HOME/.bashrc" && cd - > /dev/null 2>&1 && nyan"
|
||||||
|
|
||||||
# Clean up LaunchServices to remove duplicates in the “Open With” menu
|
# Clean up LaunchServices to remove duplicates in the “Open With” menu
|
||||||
#alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder"
|
#alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder"
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
brew install exiftool imagemagick optipng libjpeg gifsicle
|
brew install exiftool imagemagick optipng libjpeg gifsicle
|
||||||
|
|
||||||
formulas='pngout.rb defluff.rb cryopng.rb imgo.rb'
|
formulas='pngout.rb defluff.rb cryopng.rb imgo.rb'
|
||||||
for package in $formulas
|
for package in $formulas
|
||||||
do
|
do
|
||||||
brew install "https://raw.github.com/imgo/imgo-tools/master/Formula/"$package
|
brew install "https://raw.github.com/imgo/imgo-tools/master/Formula/"$package
|
||||||
done
|
done
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Installs Homebrew, Git, git-extras, git-friendly, Node.js, configures Apache, PHP, MySQL, etc.
|
# Installs Homebrew, Git, git-extras, git-friendly, hub, Node.js, configures Apache, PHP, MySQL, etc.
|
||||||
|
|
||||||
# Ask for the administrator password upfront
|
# Ask for the administrator password upfront
|
||||||
sudo -v
|
sudo -v
|
||||||
@ -18,6 +18,7 @@ brew upgrade
|
|||||||
brew install coreutils
|
brew install coreutils
|
||||||
# GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
|
# GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
|
||||||
brew install findutils
|
brew install findutils
|
||||||
|
brew install tree
|
||||||
|
|
||||||
# More recent versions of some OS X tools
|
# More recent versions of some OS X tools
|
||||||
brew tap homebrew/dupes
|
brew tap homebrew/dupes
|
||||||
@ -26,6 +27,7 @@ brew install homebrew/dupes/grep
|
|||||||
# Git
|
# Git
|
||||||
brew install git
|
brew install git
|
||||||
brew install git-extras
|
brew install git-extras
|
||||||
|
brew install hub
|
||||||
sudo bash < <( curl https://raw.github.com/jamiew/git-friendly/master/install.sh)
|
sudo bash < <( curl https://raw.github.com/jamiew/git-friendly/master/install.sh)
|
||||||
|
|
||||||
# MySQL
|
# MySQL
|
||||||
@ -52,7 +54,7 @@ brew install unrar
|
|||||||
# Node.js
|
# Node.js
|
||||||
brew install node
|
brew install node
|
||||||
brew install casperjs
|
brew install casperjs
|
||||||
npm install -g grunt
|
npm install -g grunt-cli
|
||||||
npm install -g jshint
|
npm install -g jshint
|
||||||
npm install -g bower
|
npm install -g bower
|
||||||
|
|
||||||
|
56
setup/update.sh
Executable file
56
setup/update.sh
Executable file
@ -0,0 +1,56 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get OS X Software Updates, update Homebrew, NPM, Ruby packages, dotfiles and some other software
|
||||||
|
|
||||||
|
function header() {
|
||||||
|
echo -e "$(tput sgr 0 1)$(tput setaf 6)$1$(tput sgr0)"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ask for the administrator password upfront
|
||||||
|
sudo -v
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Dotfiles
|
||||||
|
header "Updating dotfiles..."
|
||||||
|
cd "$HOME/dotfiles"
|
||||||
|
git pull
|
||||||
|
./sync.py
|
||||||
|
source "$HOME/.bashrc"
|
||||||
|
cd - > /dev/null 2>&1
|
||||||
|
echo
|
||||||
|
|
||||||
|
# OS X
|
||||||
|
header "Updating OS X..."
|
||||||
|
sudo softwareupdate -i -a
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Homebrew
|
||||||
|
header "Updating Homebrew..."
|
||||||
|
brew update
|
||||||
|
brew upgrade
|
||||||
|
brew cleanup
|
||||||
|
echo
|
||||||
|
|
||||||
|
# NPM
|
||||||
|
header "Updating NPM..."
|
||||||
|
npm update npm -g
|
||||||
|
npm update -g
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Ruby gems
|
||||||
|
header "Updating Ruby gems..."
|
||||||
|
sudo gem update
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Python
|
||||||
|
header "Updating Python packages..."
|
||||||
|
sudo pip install --upgrade fabric
|
||||||
|
echo
|
||||||
|
|
||||||
|
# git-friendly
|
||||||
|
header "Updating git-friendly..."
|
||||||
|
sudo bash < <( curl https://raw.github.com/jamiew/git-friendly/master/install.sh)
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Nyan cat! Yay!
|
||||||
|
nyan
|
Loading…
Reference in New Issue
Block a user