File: python-search.sh

package info (click to toggle)
openmsx 0.8.2-2.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 15,796 kB
  • sloc: cpp: 124,615; xml: 22,614; tcl: 7,336; python: 3,789; asm: 1,154; sh: 69; makefile: 25
file content (12 lines) | stat: -rwxr-xr-x 297 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# $Id: python-search.sh 12011 2011-03-13 03:09:55Z mthuurne $
for name in python python2 python2.5 python2.6 python2.7 python2.8 python2.9
do
	$name -c 'import sys; sys.exit(not((2, 5) <= sys.version_info < (3, )))' \
		2> /dev/null
	if test $? -eq 0
	then
		echo $name
		break
	fi
done