Updated for naming

This commit is contained in:
Dimitris Zlatanidis 2023-05-09 20:01:55 +03:00
parent fb709abdf7
commit b19c874736

View file

@ -55,6 +55,7 @@ class Download(Configs):
self.copy_slackbuild_scripts(pkg)
self.download_the_sources()
elapsed_time: float = time.time() - start
self.utils.finished_time(elapsed_time)
@ -63,24 +64,24 @@ class Download(Configs):
if self.option_for_directory:
self.download_path: Path = self.directory
def save_binary_sources(self, pkg: str) -> None:
package: str = self.data[pkg][1]
mirror: str = self.data[pkg][2]
location: str = self.data[pkg][3]
self.urls.append(f'{mirror}{location}/{package}')
def save_binary_sources(self, package: str) -> None:
package_name: str = self.data[package][1]
mirror: str = self.data[package][2]
location: str = self.data[package][3]
self.urls.append(f'{mirror}{location}/{package_name}')
def save_slackbuild_sources(self, pkg: str) -> None:
if self.os_arch == 'x86_64' and self.data[pkg][4]:
sources: list = self.data[pkg][4].split()
def save_slackbuild_sources(self, package: str) -> None:
if self.os_arch == 'x86_64' and self.data[package][4]:
sources: list = self.data[package][4].split()
else:
sources: list = self.data[pkg][3].split()
sources: list = self.data[package][3].split()
self.urls.extend(sources)
def copy_slackbuild_scripts(self, pkg: str) -> None:
repo_path_package: Path = Path(self.sbo_repo[self.repository], self.data[pkg][0], pkg)
if not Path(self.download_path, pkg).is_dir():
shutil.copytree(repo_path_package, Path(self.download_path, pkg))
print(f"{self.byellow}Copying{self.endc}: {repo_path_package} -> {Path(self.download_path, pkg)}")
def copy_slackbuild_scripts(self, package: str) -> None:
repo_path_package: Path = Path(self.sbo_repo[self.repository], self.data[package][0], package)
if not Path(self.download_path, package).is_dir():
shutil.copytree(repo_path_package, Path(self.download_path, package))
print(f"{self.byellow}Copying{self.endc}: {repo_path_package} -> {Path(self.download_path, package)}")
def download_the_sources(self) -> None:
down = Downloader(self.download_path, self.urls, self.flags)