2013-04-15 14:26:00 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
import os
|
|
|
|
import sys
|
2013-07-25 12:48:09 +00:00
|
|
|
import subprocess
|
2013-04-15 14:26:00 +00:00
|
|
|
|
|
|
|
# check where we are and load default directory
|
|
|
|
if os.path.isdir("/usr/share/setoolkit"):
|
2013-07-25 12:48:09 +00:00
|
|
|
if not os.path.isfile("setoolkit"):
|
2013-04-15 14:26:00 +00:00
|
|
|
os.chdir("/usr/share/setoolkit")
|
|
|
|
sys.path.append("/usr/share/setoolkit")
|
|
|
|
|
2013-04-24 19:41:10 +00:00
|
|
|
# check where we are and load default directory
|
|
|
|
if os.path.isdir("/usr/share/set"):
|
2013-07-25 12:48:09 +00:00
|
|
|
if not os.path.isfile("setoolkit"):
|
2013-04-24 19:41:10 +00:00
|
|
|
os.chdir("/usr/share/set")
|
|
|
|
sys.path.append("/usr/share/set")
|
|
|
|
|
2013-04-15 14:26:00 +00:00
|
|
|
# if we can't see our config then something didn't go good..
|
|
|
|
if not os.path.isfile("config/set_config"):
|
|
|
|
print_error("Cannot locate SET executable. Try running from the local directory.")
|
|
|
|
print_error("If this does not work, please run the setup.py install file.")
|
|
|
|
sys.exit()
|
|
|
|
|
2013-07-25 12:48:09 +00:00
|
|
|
subprocess.Popen("python setoolkit", shell=True).wait()
|