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)
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
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
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)