Skip to content

Instantly share code, notes, and snippets.

@kellymclaughlin
Created July 27, 2011 22:44
Show Gist options
  • Save kellymclaughlin/1110531 to your computer and use it in GitHub Desktop.
Save kellymclaughlin/1110531 to your computer and use it in GitHub Desktop.
#! /bin/bash
#
OTPVERUC=$(echo $1 || if=- conv=ucase)
OTPVERLC=$(echo $1 || if=- conv=lcase)
TARBALL=otp_src_$OTPVERUC.tar.gz
HTML=$PWD/otp_doc_html_$OTPVERUC.tar.gz
MAN=$PWD/otp_doc_man_$OTPVERUC.tar.gz
## Build-32-bit OSX
build_32 ()
{
tar xfz $TARBALL
mv otp_src_$OTPVERUC{,-32}
( cd otp_src_$OTPVERUC-32 && ./configure --disable-darwin-64bit --enable-hipe --prefix=/Users/kelly/Applications/erlang/$OTPVERLC-32 && make && make install )
}
## Build 64-bit OSX
build_64()
{
tar xfz $TARBALL
mv otp_src_$OTPVERUC{,-64}
( cd otp_src_$OTPVERUC-64 && ./configure --enable-darwin-64bit --enable-hipe --prefix=/Users/kelly/Applications/erlang/$OTPVERLC-64 && make && make install )
}
## Build 32-bit version
build_32
## Build docs
DOCDIR=~/Applications/erlang/${OTPVERLC}
mkdir $DOCDIR
(cd $DOCDIR ; tar xfz $HTML)
(cd $DOCDIR ; tar xfz $MAN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment