diff --git a/slpkg/update_repository.py b/slpkg/update_repository.py index a52d7c31..a20823fb 100644 --- a/slpkg/update_repository.py +++ b/slpkg/update_repository.py @@ -53,46 +53,32 @@ class UpdateRepository(Configs): else: print() + bin_repositories: dict = { + self.repos.alien_repo_name: self.alien_repository, + self.repos.multilib_repo_name: self.multilib_repository, + self.repos.restricted_repo_name: self.restricted_repository, + self.repos.gnome_repo_name: self.gnome_repository, + self.repos.msb_repo_name: self.csb_repository, + self.repos.csb_repo_name: self.csb_repository, + self.repos.conraid_repo_name: self.conraid_repository, + self.repos.slackonly_repo_name: self.slackonly_repository, + self.repos.ponce_bin_repo_name: self.ponce_bin_repository, + self.repos.salixos_repo_name: self.salixos_repository, + self.repos.salixos_extra_repo_name: self.salixos_extra_repository, + self.repos.slackel_repo_name: self.slackel_repository, + self.repos.slint_repo_name: self.slint_repository + } + if self.utils.is_option(self.flag_bin_repository, self.flags): - if self.repo == self.repos.alien_repo_name or self.repo == '*': - self.alien_repository() - if self.repo == self.repos.multilib_repo_name or self.repo == '*': - self.multilib_repository() + for repo in bin_repositories.keys(): - if self.repo == self.repos.restricted_repo_name or self.repo == '*': - self.restricted_repository() - - if self.repo == self.repos.gnome_repo_name or self.repo == '*': - self.gnome_repository() - - if self.repo == self.repos.msb_repo_name or self.repo == '*': - self.msb_repository() - - if self.repo == self.repos.csb_repo_name or self.repo == '*': - self.csb_repository() - - if self.repo == self.repos.conraid_repo_name or self.repo == '*': - self.conraid_repository() - - if self.repo == self.repos.slackonly_repo_name or self.repo == '*': - self.slackonly_repository() - - if self.repo == self.repos.ponce_bin_repo_name or self.repo == '*': - self.ponce_bin_repository() - - if self.repo == self.repos.salixos_repo_name or self.repo == '*': - self.salixos_repository() - - if self.repo == self.repos.salixos_extra_repo_name or self.repo == '*': - self.salixos_extra_repository() - - if self.repo == self.repos.slackel_repo_name or self.repo == '*': - self.slackel_repository() - - if self.repo == self.repos.slint_repo_name or self.repo == '*': - self.slint_repository() + if repo == self.repo: + bin_repositories[repo]() + break + if self.repo == '*': + bin_repositories[repo]() else: self.slackbuild_repositories()