tinyyarn

scenario testing of Unix command line tools
git clone git://git.vx21.xyz/tinyyarn
Log | Files | Refs | README | LICENSE

find_lua (496B)


      1 #!/usr/bin/env bash
      2 
      3 # stolen from Luxio, credits Rob Kendrick, Daniel Silverstone
      4 ((which lua5.1 > /dev/null 2>&1 && echo lua5.1) ||
      5                     (which lua-5.1 > /dev/null 2>&1 && echo lua-5.1) || \
      6                     (which lua51  > /dev/null 2>&1 && echo lua51) || \
      7                     (lua -e"print(_VERSION)" | grep -q 5.1 && echo lua) || \
      8                     (which lua-5.2 > /dev/null 2>&1 && echo lua-5.2) || \
      9                     (which lua52 > /dev/null 2>&1 && echo lua52))