summarylogtreecommitdiffstats
path: root/bcnc-git
blob: ba20a88a55368da3601d77a87ad6ddc1cdd127c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env sh

#Autodetect python version
[ .$PYTHON = . ] && PYTHON=`which python2`
[ .$PYTHON = . ] && PYTHON=python

#Autodetect bCNC install
#If this script is placed in directory with bCNC module it will launch it
#When placed somewhere else (eg. /usr/bin) it will launch bCNC from system
DIR=`dirname $0`
[ -f "${DIR}"/bCNC-git/__main__.py ] && cd "${DIR}" &&
	echo "Launching bCNC from ${DIR}" ||
	echo "Launching local installation of bCNC"

#Launch
"$PYTHON" -m bCNC-git $*