From adfc029a023ccff700fe31e433717b05a3eaefa2 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Mon, 14 Nov 2011 14:24:30 +0100 Subject: [PATCH] Use lsb_release for distro detection. --- stack.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index 78851b9..1255ad0 100755 --- a/stack.sh +++ b/stack.sh @@ -22,7 +22,9 @@ # Warn users who aren't on natty, but allow them to override check and attempt # installation with ``FORCE=yes ./stack`` -if ! egrep -q 'natty|oneiric' /etc/lsb-release; then +DISTRO=$(lsb_release -c -s) + +if [[ ! ${DISTRO} =~ (natty|oneiric) ]]; then echo "WARNING: this script has only been tested on natty and oneiric" if [[ "$FORCE" != "yes" ]]; then echo "If you wish to run this script anyway run with FORCE=yes"