#!/bin/bash

[ -d ruby-1.9.1-p376 ] && rm -r ruby-1.9.1-p376
tar xzvf ruby-1.9.1-p376.tar.gz
cd ruby-1.9.1-p376
./configure --prefix=/usr/local --enable-shared --enable-pthread
make 
make install DESTDIR=/mnt/hda2/ruby/pkg
find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null