Browse code

Use lsb_release for distro detection.

Chmouel Boudjnah authored on 2011/11/14 22:24:30
Showing 1 changed files
... ...
@@ -22,7 +22,9 @@
22 22
 
23 23
 # Warn users who aren't on natty, but allow them to override check and attempt
24 24
 # installation with ``FORCE=yes ./stack``
25
-if ! egrep -q 'natty|oneiric' /etc/lsb-release; then
25
+DISTRO=$(lsb_release -c -s)
26
+
27
+if [[ ! ${DISTRO} =~ (natty|oneiric) ]]; then
26 28
     echo "WARNING: this script has only been tested on natty and oneiric"
27 29
     if [[ "$FORCE" != "yes" ]]; then
28 30
         echo "If you wish to run this script anyway run with FORCE=yes"