Updated for messages

This commit is contained in:
Dimitris Zlatanidis 2023-05-01 09:38:10 +03:00
parent 34d36bfc43
commit d94fde456a

View file

@ -85,8 +85,8 @@ class UpdateRepository(Configs):
print() print()
def slack_repository(self): def slack_repository(self):
print(f"Downloading the '{self.green}{self.repos.slack_repo_name}{self.endc}" print(f"Downloading the '{self.green}{self.repos.slack_repo_name}{self.endc}' repository "
f"' repository, please wait...\n") f"in the '{self.repos.slack_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.slack_repo_path) self.utils.create_directory(self.repos.slack_repo_path)
@ -116,8 +116,8 @@ class UpdateRepository(Configs):
print() print()
def slack_extra_repository(self): def slack_extra_repository(self):
print(f"Downloading the '{self.green}{self.repos.slack_extra_repo_name}{self.endc}" print(f"Downloading the '{self.green}{self.repos.slack_extra_repo_name}{self.endc}' repository "
f"' repository, please wait...\n") f"in the '{self.repos.slack_extra_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.slack_extra_repo_path) self.utils.create_directory(self.repos.slack_extra_repo_path)
@ -149,8 +149,8 @@ class UpdateRepository(Configs):
print() print()
def slack_patches_repository(self): def slack_patches_repository(self):
print(f"Downloading the '{self.green}{self.repos.slack_patches_repo_name}{self.endc}" print(f"Downloading the '{self.green}{self.repos.slack_patches_repo_name}{self.endc}' repository "
f"' repository, please wait...\n") f"in the '{self.repos.slack_patches_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.slack_patches_repo_path) self.utils.create_directory(self.repos.slack_patches_repo_path)
@ -184,8 +184,8 @@ class UpdateRepository(Configs):
print() print()
def alien_repository(self): def alien_repository(self):
print(f"Downloading the '{self.green}{self.repos.alien_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.alien_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.alien_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.alien_repo_path) self.utils.create_directory(self.repos.alien_repo_path)
@ -216,8 +216,8 @@ class UpdateRepository(Configs):
print() print()
def multilib_repository(self) -> None: def multilib_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.multilib_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.multilib_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.multilib_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.multilib_repo_path) self.utils.create_directory(self.repos.multilib_repo_path)
@ -248,8 +248,8 @@ class UpdateRepository(Configs):
print() print()
def restricted_repository(self) -> None: def restricted_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.restricted_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.restricted_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.restricted_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.restricted_repo_path) self.utils.create_directory(self.repos.restricted_repo_path)
@ -280,8 +280,8 @@ class UpdateRepository(Configs):
print() print()
def gnome_repository(self) -> None: def gnome_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.gnome_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.gnome_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.gnome_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.gnome_repo_path) self.utils.create_directory(self.repos.gnome_repo_path)
@ -311,8 +311,8 @@ class UpdateRepository(Configs):
print() print()
def msb_repository(self) -> None: def msb_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.msb_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.msb_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.msb_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.msb_repo_path) self.utils.create_directory(self.repos.msb_repo_path)
@ -343,8 +343,8 @@ class UpdateRepository(Configs):
print() print()
def csb_repository(self) -> None: def csb_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.csb_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.csb_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.csb_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.csb_repo_path) self.utils.create_directory(self.repos.csb_repo_path)
@ -374,8 +374,8 @@ class UpdateRepository(Configs):
print() print()
def conraid_repository(self) -> None: def conraid_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.conraid_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.conraid_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.conraid_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.conraid_repo_path) self.utils.create_directory(self.repos.conraid_repo_path)
@ -406,8 +406,8 @@ class UpdateRepository(Configs):
def slackonly_repository(self) -> None: def slackonly_repository(self) -> None:
if not self.repos.slackonly_repo_mirror[0].startswith('file'): if not self.repos.slackonly_repo_mirror[0].startswith('file'):
print(f"Downloading the '{self.green}{self.repos.slackonly_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.slackonly_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.slackonly_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.slackonly_repo_path) self.utils.create_directory(self.repos.slackonly_repo_path)
@ -437,8 +437,8 @@ class UpdateRepository(Configs):
print() print()
def salixos_repository(self) -> None: def salixos_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.salixos_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.salixos_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.salixos_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.salixos_repo_path) self.utils.create_directory(self.repos.salixos_repo_path)
@ -468,8 +468,8 @@ class UpdateRepository(Configs):
print() print()
def salixos_extra_repository(self) -> None: def salixos_extra_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.salixos_extra_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.salixos_extra_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.salixos_extra_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.salixos_extra_repo_path) self.utils.create_directory(self.repos.salixos_extra_repo_path)
@ -503,8 +503,8 @@ class UpdateRepository(Configs):
print() print()
def salixos_patches_repository(self) -> None: def salixos_patches_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.salixos_patches_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.salixos_patches_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.salixos_patches_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.slack_patches_repo_path) self.utils.create_directory(self.repos.slack_patches_repo_path)
@ -540,8 +540,8 @@ class UpdateRepository(Configs):
print() print()
def slackel_repository(self) -> None: def slackel_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.slackel_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.slackel_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.slackel_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.slackel_repo_path) self.utils.create_directory(self.repos.slackel_repo_path)
@ -571,8 +571,8 @@ class UpdateRepository(Configs):
print() print()
def slint_repository(self) -> None: def slint_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.slint_repo_name}{self.endc}' " print(f"Downloading the '{self.green}{self.repos.slint_repo_name}{self.endc}' repository "
f"repository, please wait...\n") f"in the '{self.repos.slint_repo_path}' folder, please wait...\n")
urls: list = [] urls: list = []
self.utils.create_directory(self.repos.slint_repo_path) self.utils.create_directory(self.repos.slint_repo_path)
@ -604,10 +604,9 @@ class UpdateRepository(Configs):
def slackbuild_repositories(self) -> None: def slackbuild_repositories(self) -> None:
""" Update the slackbuild repositories. """ """ Update the slackbuild repositories. """
if self.repos.ponce_repo: if self.repos.ponce_repo:
if not self.option_for_generate:
if not self.option_for_generate or self.repos.ponce_repo_mirror[0].startswith('file'): print(f"Downloading the '{self.green}{self.repos.ponce_repo_name}{self.endc}' repository "
print(f"Downloading the '{self.green}{self.repos.ponce_repo_name}" f"in the '{self.repos.ponce_repo_path}' folder, please wait...\n")
f"{self.endc}' repository, please wait...\n")
self.utils.create_directory(self.repos.ponce_repo_path) self.utils.create_directory(self.repos.ponce_repo_path)
self.utils.remove_file_if_exists(self.repos.ponce_repo_path, self.repos.ponce_repo_slackbuilds) self.utils.remove_file_if_exists(self.repos.ponce_repo_path, self.repos.ponce_repo_slackbuilds)
@ -634,20 +633,18 @@ class UpdateRepository(Configs):
print('\n') print('\n')
else: else:
print(f"Downloading the '{self.green}{self.repos.sbo_repo_name}{self.endc}' repository "
f"in the '{self.repos.sbo_repo_path}' folder, please wait...\n")
if not self.repos.sbo_repo_mirror[0].startswith('file'): self.utils.create_directory(self.repos.sbo_repo_path)
print(f"Downloading the '{self.green}{self.repos.sbo_repo_name}{self.endc}' "
f"repository, please wait...\n")
self.utils.create_directory(self.repos.sbo_repo_path) self.utils.remove_file_if_exists(self.repos.sbo_repo_path, self.repos.sbo_repo_slackbuilds)
self.utils.remove_file_if_exists(self.repos.sbo_repo_path, self.repos.sbo_repo_changelog)
self.utils.remove_file_if_exists(self.repos.sbo_repo_path, self.repos.sbo_repo_slackbuilds) lftp_command: str = (f'lftp {self.lftp_mirror_options} {self.repos.sbo_repo_mirror[0]} '
self.utils.remove_file_if_exists(self.repos.sbo_repo_path, self.repos.sbo_repo_changelog) f'{self.repos.sbo_repo_path}')
lftp_command: str = (f'lftp {self.lftp_mirror_options} {self.repos.sbo_repo_mirror[0]} ' self.utils.process(lftp_command)
f'{self.repos.sbo_repo_path}')
self.utils.process(lftp_command)
self.delete_last_updated(self.repos.sbo_repo_name) self.delete_last_updated(self.repos.sbo_repo_name)
self.delete_sbo_database_data() self.delete_sbo_database_data()