Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save tomohiro/3053979 to your computer and use it in GitHub Desktop.
Save tomohiro/3053979 to your computer and use it in GitHub Desktop.
A shell script for installing some applications on OS X
#!/bin/sh
# This script will install Command Line Tools for Xcode on a fresh installation of OS X.
# Usage: curl https://raw.github.com/gist/3053979/install-command-line-tools-for-xcode.sh | sh
DMG='command_line_tools_for_xcode_june_2012.dmg'
cd $HOME/Downloads
if [ ! -f ./$DMG ]; then
echo 'Command Line Tools for Xcode not downloaded.'
exit 1
fi
hdiutil attach $DMG
sudo installer -pkg '/Volumes/Command Line Tools/Command Line Tools.mpkg' -target /
hdiutil detach "/Volumes/Command Line Tools"
rm -i $DMG
cd -
echo 'Finished install Command Line Tools for Xcode'
#!/bin/sh
# This script will install Homebrew on a fresh installation of OS X.
# Usage: curl https://raw.github.com/gist/3053979/install-homebrew.sh | sh
# https://github.com/mxcl/homebrew/wiki/installation
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
#!/bin/sh
# This script will download and install Sophos Anti-Virus for Mac Home Edition
# on a fresh installation of OS X.
# Usage: curl https://raw.github.com/gist/3053979/install-sophos-anti-virus.sh | sh
cd $HOME/Downloads
curl -L -o Sophos.dmg http://downloads.sophos.com/home-edition/savosx_80_he.dmg
hdiutil attach Sophos.dmg
sudo installer -pkg '/Volumes/Sophos Anti-Virus Home Edition OS X 10.4+/Sophos Anti-Virus Home Edition.mpkg' -target /
hdiutil detach '/Volumes/Sophos Anti-Virus Home Edition OS X 10.4+'
rm -i Sophos.dmg
cd -
open '/Applications/Sophos Anti-Virus.app'
#!/bin/sh
# This script will download and install VLC on a fresh installation of OS X.
# Usage: curl https://raw.github.com/gist/3053979/install-vlc.sh | sh
readonly VLC_VERSION=2.0.2
cd $HOME/Downloads
curl -L -o VLC.dmg "http://sourceforge.net/projects/vlc/files/2.0.2/macosx/vlc-$VLC_VERSION-intel64.dmg"
hdiutil attach VLC.dmg
ditto -rsrc "/Volumes/vlc-$VLC_VERSION/VLC.app" /Applications/VLC.app
hdiutil detach "/Volumes/vlc-$VLC_VERSION"
rm -i VLC.dmg
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment