1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Added Fedora support to install-all.sh

This commit is contained in:
James Booth 2012-07-22 00:49:19 +01:00
parent ca258ae1bd
commit 76fe37efb7

View File

@ -1,5 +1,7 @@
#!/bin/sh
ubuntu_deps()
{
echo
echo Profanity installer ... updating apt repositories
echo
@ -10,6 +12,21 @@ echo Profanity installer... installing dependencies
echo
sudo apt-get -y install g++ autoconf libssl-dev libexpat1-dev libncurses5-dev libxml2-dev libglib2.0-dev libnotify-dev
}
fedora_deps()
{
echo
echo Profanity installer... installing dependencies
echo
ARCH=`arch`
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
}
install_head_unit()
{
echo
echo Profanity installer... installing head-unit
echo
@ -19,7 +36,10 @@ make
sudo make install
cd ..
}
install_lib_strophe()
{
echo
echo Profanity installer... installing libstrophe
echo
@ -31,7 +51,10 @@ make
sudo make install
cd ..
}
install_profanity()
{
echo
echo Profanity installer... installing Profanity
echo
@ -39,7 +62,10 @@ echo
./configure
make
sudo make install
}
cleanup()
{
echo
echo Profanity installer... cleaning up
echo
@ -55,3 +81,31 @@ echo Profanity installer... complete!
echo
echo Type \'profanity\' to run.
echo
}
DIST=unknown
uname -a | grep --ignore-case fedora
if [ $? -eq 0 ]; then
DIST=fedora
fi
uname -a | grep --ignore-case ubuntu
if [ $? -eq 0 ]; then
DIST=ubuntu
fi
case "$DIST" in
unknown) echo Unsupported distribution, exising.
exit
;;
fedora) fedora_deps
;;
ubuntu) ubuntu_deps
;;
esac
install_head_unit
install_lib_strophe
install_profanity
cleanup