#!/bin/bash -e
ver=1.8.0
dir=libuv-v$ver
fn=$dir.tar.gz
url=http://dist.libuv.org/dist/v1.8.0/$fn

rm -rf $fn $dir

echo Download $url
wget $url

echo Extract $fn 
tar xf $fn

echo Make $dir
cd $dir
sh autogen.sh
./configure -q
make CFLAGS=-w
sudo make install

echo Remove source $fn $dir
cd ..
rm -rf $fn $dir
