~ubuntu-branches/ubuntu/vivid/phabricator/vivid-proposed

« back to all changes in this revision

Viewing changes to libphutil/support/xhpast/find_flex.sh

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-10-23 20:49:26 UTC
  • mfrom: (0.2.1) (0.1.1)
  • Revision ID: package-import@ubuntu.com-20141023204926-vq80u1op4df44azb
Tags: 0~git20141023-1
Initial release (closes: #703046)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
FLEX=`which flex35 2>/dev/null || which flex 2>/dev/null`
 
4
if [ $? -ne 0 ]
 
5
then
 
6
  echo "ERROR: 'flex' is not installed on this system." 1>&2;
 
7
  exit 1;
 
8
fi
 
9
 
 
10
FLEXVERSION=`"$FLEX" --version`
 
11
 
 
12
if [[ $FLEXVERSION == "flex 2.5.4" ]]
 
13
then
 
14
  echo "ERROR: the version of flex on this system is too old." 1>&2
 
15
  echo "Upgrade to at least 2.5.35 (which is NEWER than 2.5.4)." 1>&2
 
16
  exit 1;
 
17
fi
 
18
 
 
19
if [ "$FLEXVERSION" != "flex 2.5.35" -a "$FLEXVERSION" != "flex35 2.5.35" ]
 
20
then
 
21
  echo "WARNING: the version of flex on this system may be incorrect." 1>&2
 
22
  echo "If you receive errors, try upgrading to 2.5.35 or newer." 1>&2
 
23
fi
 
24
 
 
25
echo $FLEX