1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-07-07 18:04:15 -04: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 #!/bin/sh
ubuntu_deps() debian_deps()
{ {
echo echo
echo Profanity installer ... updating apt repositories echo Profanity installer ... updating apt repositories
@ -83,31 +83,25 @@ cleanup()
echo echo
} }
OS=`uname -s`
DIST=unknown DIST=unknown
uname -a | grep --ignore-case fedora if [ "${OS}" = "Linux" ]; then
if [ $? -eq 0 ]; then if [ -f /etc/fedora-release ]; then
DIST=fedora DIST=fedora
fi elif [ -f /etc/debian-release ]; then
DIST=debian
# quick hack check for Fedora 16 fi
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
fi fi
case "$DIST" in 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 exit
;; ;;
fedora) fedora_deps fedora) fedora_deps
;; ;;
ubuntu) ubuntu_deps debian) debian_deps
;; ;;
esac esac