Commit 930768cd authored by ahoms's avatar ahoms
Browse files

* add support for BLISSADM device server directory structure



git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@215 45c4679d-1946-429d-baad-37912b19538b
parent 602116e5
#!/usr/bin/env python
import os, sys
def get_compat_os(target_dir, sub_dir=None):
cs_path = ['/csadmin/local/scripts', '/csadmin/common/scripts']
script_name = 'get_compat_os.share'
for cs_dir in cs_path:
script = cs_dir + '/' + script_name
if os.path.exists(script):
break
else:
raise 'Cannot find compat os'
p = os.popen(script)
compat_os = p.readline().strip()
for os_name in compat_os.split():
path = target_dir + '/' + os_name
if sub_dir:
path += '/' + sub_dir
if os.path.exists(path):
return path
prog_name = os.path.basename(sys.argv[0])
this_dir = os.path.dirname(__file__)
server_dir = '%s/..' % this_dir
lib_dir = get_compat_os(server_dir, '/lib/' + prog_name)
sys.path.append(lib_dir)
from FrelonTacoCcd import FrelonServer
def main(argv):
prog_name = os.path.basename(argv[0])
try:
pers_name = argv[1]
except:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment