diff options
author | James Booth <boothj5@gmail.com> | 2012-09-08 14:54:41 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-09-08 14:54:41 +0100 |
commit | 7f962895bc678b7867f03b4702d96dd5782bc066 (patch) | |
tree | ffbbb661273fcfe6113647374f3c7bc58ff6f805 | |
parent | c1a2443bb12e86b080eb567fdde8164dc6035318 (diff) | |
download | profani-tty-7f962895bc678b7867f03b4702d96dd5782bc066.tar.gz |
Install script now uses distribution release file
-rwxr-xr-x | install-all.sh | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/install-all.sh b/install-all.sh index 110a4228..30b86e30 100755 --- a/install-all.sh +++ b/install-all.sh @@ -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 |