MrDraw/run
Marcel Hellwig e46e7b3ee2 changed magic line from python->python2
Since python is sometimes (and for me on arch linux) a symlink to the
python3 utils, you should be more explicit with that.
2015-09-17 18:04:14 +02:00

22 lines
579 B
Python
Executable file

#!/usr/bin/env python2
import os
import sys
basedir = os.path.dirname(os.path.realpath(__file__))
old = os.path.join(basedir, "octoprint")
if os.path.exists(old):
# rename left-overs from old file structure
print """
Found left-overs from old file structure, renaming to
"octoprint.backup". Please remove this manually (I don't
dare to do so myself since you might have changes in there
I don't know anything about).
"""
os.rename(old, os.path.join(basedir, "octoprint.backup"))
sys.path.insert(0, os.path.join(basedir, "src"))
import octoprint
octoprint.main()