2012-07-09 21:14:07 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-09-08 09:54:41 -04:00
|
|
|
debian_deps()
|
2012-07-21 19:49:19 -04:00
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer ... updating apt repositories
|
|
|
|
echo
|
|
|
|
sudo apt-get update
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing dependencies
|
|
|
|
echo
|
2012-07-28 20:42:40 -04:00
|
|
|
sudo apt-get -y install g++ autoconf libssl-dev libexpat1-dev libncurses5-dev libxml2-dev libglib2.0-dev libnotify-dev libcurl3-dev
|
2012-07-21 19:49:19 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
fedora_deps()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing dependencies
|
|
|
|
echo
|
|
|
|
|
|
|
|
ARCH=`arch`
|
|
|
|
|
2012-07-28 21:09:20 -04:00
|
|
|
sudo yum -y install gcc gcc-c++ autoconf automake openssl-devel.$ARCH expat-devel.$ARCH ncurses-devel.$ARCH libxml2-devel.$ARCH glib2-devel.$ARCH libnotify-devel.$ARCH libcurl-devel.$ARCH
|
2012-07-21 19:49:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
install_head_unit()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing head-unit
|
|
|
|
echo
|
|
|
|
git clone git://github.com/boothj5/head-unit.git
|
|
|
|
cd head-unit
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
|
|
|
install_lib_strophe()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing libstrophe
|
|
|
|
echo
|
|
|
|
git clone git://github.com/metajack/libstrophe.git
|
|
|
|
cd libstrophe
|
|
|
|
./bootstrap.sh
|
|
|
|
./configure
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
|
|
|
install_profanity()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing Profanity
|
|
|
|
echo
|
|
|
|
./bootstrap.sh
|
|
|
|
./configure
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
}
|
|
|
|
|
|
|
|
cleanup()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... cleaning up
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo Removing head-unit repository...
|
|
|
|
rm -rf head-unit
|
|
|
|
|
|
|
|
echo Removing libstrophe repository...
|
|
|
|
rm -rf libstrophe
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo Profanity installer... complete!
|
|
|
|
echo
|
|
|
|
echo Type \'profanity\' to run.
|
|
|
|
echo
|
|
|
|
}
|
|
|
|
|
2012-09-08 09:54:41 -04:00
|
|
|
OS=`uname -s`
|
2012-07-21 19:49:19 -04:00
|
|
|
DIST=unknown
|
|
|
|
|
2012-09-08 09:54:41 -04:00
|
|
|
if [ "${OS}" = "Linux" ]; then
|
|
|
|
if [ -f /etc/fedora-release ]; then
|
|
|
|
DIST=fedora
|
2012-09-08 10:07:03 -04:00
|
|
|
elif [ -f /etc/debian_version ]; then
|
2012-09-08 09:54:41 -04:00
|
|
|
DIST=debian
|
|
|
|
fi
|
2012-07-21 19:49:19 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
case "$DIST" in
|
2012-09-08 09:54:41 -04:00
|
|
|
unknown) echo The install script will not work on this OS.
|
|
|
|
echo Try a manual install instead.
|
2012-07-21 19:49:19 -04:00
|
|
|
exit
|
|
|
|
;;
|
|
|
|
fedora) fedora_deps
|
|
|
|
;;
|
2012-09-08 09:54:41 -04:00
|
|
|
debian) debian_deps
|
2012-07-21 19:49:19 -04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
install_head_unit
|
|
|
|
install_lib_strophe
|
|
|
|
install_profanity
|
|
|
|
cleanup
|