2005-12-20 18:17:30 -05:00
|
|
|
#!/bin/bash
|
2005-12-21 11:24:37 -05:00
|
|
|
install=
|
2005-12-20 18:17:30 -05:00
|
|
|
base=http://www.sofaswitch.com/mikej
|
|
|
|
tar=$1
|
2005-12-21 11:24:37 -05:00
|
|
|
|
|
|
|
shift
|
|
|
|
|
|
|
|
if [ ! -z $1 ] && [ $1 = install ] ; then
|
|
|
|
install=1
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd libs
|
|
|
|
|
|
|
|
if [ -d $tar ] ; then
|
|
|
|
uncompressed=$tar
|
|
|
|
tar=
|
|
|
|
else
|
|
|
|
uncompressed=`echo $tar | sed "s/\.tar\.gz//g"`
|
|
|
|
if [ ! -f $tar ] ; then
|
|
|
|
rm -fr $uncompressed
|
|
|
|
wget $base/$tar
|
|
|
|
if [ ! -f $tar ] ; then
|
|
|
|
echo cannot find $tar
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
tar -zxvf $tar
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f $uncompressed/.complete ] && [ -z $install ] ; then
|
2005-12-20 18:17:30 -05:00
|
|
|
echo $uncompressed already installed
|
|
|
|
exit
|
|
|
|
fi
|
2005-12-21 11:24:37 -05:00
|
|
|
|
2005-12-20 18:17:30 -05:00
|
|
|
cd $uncompressed
|
2005-12-21 11:24:37 -05:00
|
|
|
|
2005-12-20 18:17:30 -05:00
|
|
|
./configure $@
|
|
|
|
|
2005-12-21 11:24:37 -05:00
|
|
|
if [ $? == 0 ] ; then
|
|
|
|
make
|
|
|
|
else
|
|
|
|
echo ERROR
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z $install ] ; then
|
|
|
|
make install
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $? == 0 ] ; then
|
|
|
|
touch .complete
|
|
|
|
else
|
|
|
|
echo ERROR
|
|
|
|
exit 1
|
|
|
|
fi
|
2005-12-20 18:17:30 -05:00
|
|
|
|
2005-12-21 11:24:37 -05:00
|
|
|
exit 0
|