def extract_binary(binary): if (os.path.lexists(ARGS.install_dir +"/"+binary+ ".tar.gz")): if (windows): cygwin_untar(ARGS.install_dir +"/"+binary+ ".tar.gz",binary+ ".tar.gz") else: untar(binary+ ".tar.gz") else: print_console( "The required file "+binary+ ".tar.gz was not found")
def extract_tarballs(windows=False): def extract_binary(binary): if (os.path.lexists(ARGS.install_dir +"/"+binary+ ".tar.gz")): if (windows): cygwin_untar(ARGS.install_dir +"/"+binary+ ".tar.gz",binary+ ".tar.gz") else: untar(binary+ ".tar.gz") else: print_console( "The required file "+binary+ ".tar.gz was not found") print_console( "Decompressing framework...") os.chdir(ARGS.install_dir) if (os.path.lexists(ARGS.install_dir + "/framework.tar.gz")): if (windows and not ARGS.isGitDev): cygwin_untar(ARGS.install_dir + "/framework.tar.gz","framework.tar.gz") elif(not ARGS.isGitDev): untar("framework.tar.gz") elif (ARGS.isGitDev): if (windows): cygwin_untar(ARGS.install_dir + "/framework.tar.gz","framework.tar.gz",noroot=True) else: excludelist=list() if (ARGS.is_update): exclude.append("local") untar("framework.tar.gz",path=".",noroot=True,exclude=excludelist) #print_console("Restoring permission/time data.") #restoreMetaData(ARGS.install_dir) #print_console("Metadata restored.") else: print_console( "The required file framework.tar.gz was not found") return print_console( "Decompressing binaries...") if (not ARGS.multi_bins): extract_binary(ARGS.platform) else: for each in ARGS.platforms: extract_binary(each)