Beispiel #1
0
def untar_local(tarname):
    '''Untar a repository shipped with the job'''
    install_path = os.getcwd()
    job_tools.untar_file(tarname, installPath, 'rat', os.getcwd(),
                         0)  # nothing to strip, but do need to move
    # For some reason, configure is not x by default
    job_tools.execute('chmod', ['u+x', 'rat/configure'], cwd=installPath)
Beispiel #2
0
def download_rat(token, run_version, install_path):
    '''download the requested version of RAT, unzip it and
    move it all to a rat directory
    Should use method to ship with job instead'''
    cache_path = os.getcwd()
    url = "https://api.github.com/repos/snoplus/rat/tarball/%s" % run_version
    tar_name = 'rat.tar.gz'
    job_tools.download_file(url, token, filename=tar_name, cache_path=cache_path)
    job_tools.untar_file( tarName, installPath, 'rat', cache_path, 1 ) # Strip the first directory
Beispiel #3
0
def download_rat(token, run_version, install_path):
    '''download the requested version of RAT, unzip it and
    move it all to a rat directory
    Should use method to ship with job instead'''
    cache_path = os.getcwd()
    url = "https://api.github.com/repos/snoplus/rat/tarball/%s" % run_version
    tar_name = 'rat.tar.gz'
    job_tools.download_file(url,
                            token,
                            filename=tar_name,
                            cache_path=cache_path)
    job_tools.untar_file(tarName, installPath, 'rat', cache_path,
                         1)  # Strip the first directory
Beispiel #4
0
def untar_local(tarname):
    '''Untar a repository shipped with the job'''
    install_path = os.getcwd()
    job_tools.untar_file(tarname, installPath, 'rat', os.getcwd(), 0) # nothing to strip, but do need to move
    # For some reason, configure is not x by default
    job_tools.execute('chmod', ['u+x','rat/configure'], cwd=installPath)