Skip to content

Commit adfc029

Browse files
committed
Use lsb_release for distro detection.
1 parent aa4aa2e commit adfc029

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stack.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222

2323
# Warn users who aren't on natty, but allow them to override check and attempt
2424
# 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
2628
echo "WARNING: this script has only been tested on natty and oneiric"
2729
if [[ "$FORCE" != "yes" ]]; then
2830
echo "If you wish to run this script anyway run with FORCE=yes"

0 commit comments

Comments
 (0)