File: python-search.sh

package info (click to toggle)
openmsx 0.10.1-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,628 kB
  • ctags: 19,723
  • sloc: cpp: 131,938; xml: 25,418; tcl: 15,394; python: 4,012; sh: 365; makefile: 26
file content (11 lines) | stat: -rwxr-xr-x 235 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
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