Beispiel #1
0
def untar_tool(tool, envs):
    cdir = envs['cpath']
    tool_name = convert_to_os_path(cdir+"/tools/"+get_tool_property(tool,'file_name'))
    extract_dir = convert_to_os_path(get_tool_dir(tool, envs))
    if os.path.isdir(extract_dir):
        #os.system('rmdir /S /Q \"{}\"'.format(extract_dir))
        return
    extract_dir = os.path.dirname(extract_dir)
    if tarfile.is_tarfile(tool_name):
        fhand = tarfile.open(tool_name)
        fhand.extractall(extract_dir)
def untar_tool(tool, envs):
    cdir = envs['cpath']
    tool_name = convert_to_os_path(cdir+"/tools/"+get_tool_property(tool,'file_name'))
    extract_dir = convert_to_os_path(get_tool_dir(tool, envs))
    if os.path.isdir(extract_dir):
        #os.system('rmdir /S /Q \"{}\"'.format(extract_dir))
        return
    extract_dir = os.path.dirname(extract_dir)
    if tarfile.is_tarfile(tool_name):
        fhand = tarfile.open(tool_name)
        fhand.extractall(extract_dir)
def unzip_tool(tool, envs):
    cdir = envs['cpath']
    tool_name = convert_to_os_path(cdir+"/tools/"+get_tool_property(tool,'file_name'))
    extract_dir = convert_to_os_path(get_tool_dir(tool, envs))
    if os.path.isdir(extract_dir):
        #os.system('rmdir /S /Q \"{}\"'.format(extract_dir))
        return
    extract_dir = os.path.dirname(extract_dir)
    if not os.path.isdir(extract_dir):
        os.makedirs(extract_dir)
    with zipfile.ZipFile(tool_name, "r") as z:
        z.extractall(extract_dir)
Beispiel #4
0
def unzip_tool(tool, envs):
    cdir = envs['cpath']
    tool_name = convert_to_os_path(cdir+"/tools/"+get_tool_property(tool,'file_name'))
    extract_dir = convert_to_os_path(get_tool_dir(tool, envs))
    if os.path.isdir(extract_dir):
        #os.system('rmdir /S /Q \"{}\"'.format(extract_dir))
        return
    extract_dir = os.path.dirname(extract_dir)
    if not os.path.isdir(extract_dir):
        os.makedirs(extract_dir)
    with zipfile.ZipFile(tool_name, "r") as z:
        z.extractall(extract_dir)
def index_og(envs):
    print myself()
    etc = convert_to_os_path(get_temp_dir(envs)+"/etc")
    if not os.path.isdir(etc):
        os.mkdir(etc)
    java = convert_to_os_path(get_tool_dir('jre', envs)+"/bin/"+get_tool_property('jre','bin_file'))
    opengrok =   convert_to_os_path(get_tool_dir('opengrok', envs)+"/lib/"+get_tool_property('opengrok','bin_file'))
    config = convert_to_os_path(etc+"/configuration.xml")
    ctags = convert_to_os_path(get_tool_dir('ctags', envs)+"/"+get_tool_property('ctags','bin_file'))
    src = convert_to_os_path(envs['ppath'])
    data = convert_to_os_path(get_temp_dir(envs)+"/data")
    cmd = java+" -jar "+opengrok+" -W "+config+" -c "+ctags+" -P -S -s "+src+" -d "+data
    try:
        os.system(cmd)
        return True
    except:
        return False
Beispiel #6
0
def index_og(envs):
    print myself()
    etc = convert_to_os_path(get_temp_dir(envs)+"/etc")
    if not os.path.isdir(etc):
        os.mkdir(etc)
    java = convert_to_os_path(get_tool_dir('jre', envs)+"/bin/"+get_tool_property('jre','bin_file'))
    opengrok =   convert_to_os_path(get_tool_dir('opengrok', envs)+"/lib/"+get_tool_property('opengrok','bin_file'))
    config = convert_to_os_path(etc+"/configuration.xml")
    ctags = convert_to_os_path(get_tool_dir('ctags', envs)+"/"+get_tool_property('ctags','bin_file'))
    src = convert_to_os_path(envs['ppath'])
    data = convert_to_os_path(get_temp_dir(envs)+"/data")
    webapp = os.path.basename(envs['ppath'])
    cmd = java+" -jar "+opengrok+" -W "+config+" -c "+ctags+" -P -S -s "+src+" -d "+data+" -w "+webapp
    try:
        os.system(cmd)
        return True
    except:
        return False
def ospath(path):
    return convert_to_os_path(path)
Beispiel #8
0
def ospath(path):
    return convert_to_os_path(path)