1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-30 21:55:24 +00:00

Install script now uses distribution release file

This commit is contained in:
James Booth 2012-09-08 14:54:41 +01:00
parent c1a2443bb1
commit 7f962895bc

View File

@ -1,6 +1,6 @@
#!/bin/sh
ubuntu_deps()
debian_deps()
{
echo
echo Profanity installer ... updating apt repositories
@ -83,31 +83,25 @@ cleanup()
echo
}
OS=`uname -s`
DIST=unknown
uname -a | grep --ignore-case fedora
if [ $? -eq 0 ]; then
DIST=fedora
fi
# quick hack check for Fedora 16
uname -a | grep --ignore-case fc16
if [ $? -eq 0 ]; then
DIST=fedora
fi
uname -a | grep --ignore-case ubuntu
if [ $? -eq 0 ]; then
DIST=ubuntu
if [ "${OS}" = "Linux" ]; then
if [ -f /etc/fedora-release ]; then
DIST=fedora
elif [ -f /etc/debian-release ]; then
DIST=debian
fi
fi
case "$DIST" in
unknown) echo Unsupported distribution, exiting.
unknown) echo The install script will not work on this OS.
echo Try a manual install instead.
exit
;;
fedora) fedora_deps
;;
ubuntu) ubuntu_deps
debian) debian_deps
;;
esac