Skip to content

Instantly share code, notes, and snippets.

@foonicorn
foonicorn / gist:e6696fb8697668427ee0
Created July 20, 2014 07:05
Install Homebrew without sudo and wget/curl
#!/bin/bash
HOMEBREW_URL="https://github.com/Homebrew/homebrew/archive/master.zip"
HOMEBREW_DOWNLOAD=homebrew-master.zip
HOMWBREW_UNZIPED=homebrew-master
HOMEBREW_DIR="$HOME/Homebrew"
# Use Python to download homebrew because wget and curl may not be installed.
python -c "import urllib2; r=urllib2.urlopen('$HOMEBREW_URL'); f=open('$HOMEBREW_DOWNLOAD','w'); f.write(r.read()); f.close()"