Skip to content

Instantly share code, notes, and snippets.

@tetsuok
Created June 7, 2012 09:10
Show Gist options
  • Select an option

  • Save tetsuok/2887723 to your computer and use it in GitHub Desktop.

Select an option

Save tetsuok/2887723 to your computer and use it in GitHub Desktop.
Build script for Rampion.
#!/bin/sh -x
# Build script for Rampion (Gimpel & Smith, NAACL 2012).
#
# Tested rampion v0.1 on Mac OS X 10.7 and Linux.
src=rampion-v0.1.tar.gz
url=http://www.ark.cs.cmu.edu/MT/$src
# detect os, and set the number of jobs to run make.
ncpu=
downloader=
case `uname -s` in
Darwin)
ncpu=4
downloader="curl -O"
;;
Linux)
ncpu=20
downloader=wget
;;
*)
echo "Unknown platform!"
exit 1
esac
# Fetch code.
$downloader $url
tar zxvf $src
cd rampion-v0.1
# First build google-sparsehash.
tar zxvf sparsehash-2.0.2.tar.gz
cd sparsehash-2.0.2
./configure --prefix=`pwd`/../external
make -j$ncpu && make check && make install
# Now build rampion
cd ../src
make -j$ncpu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment