diff --git a/slpkg/update_repository.py b/slpkg/update_repository.py index 837796b6..e5d47da8 100644 --- a/slpkg/update_repository.py +++ b/slpkg/update_repository.py @@ -48,7 +48,12 @@ class UpdateRepository(Configs, Utilities): subprocess.call(f'lftp {self.lftp_mirror_options} {self.ponce_repo_url} {self.ponce_repo_path}', shell=True) - # Generating the SLACKBUILDS.TXT file. + # Remove the file before generating the new one. + sbo_file_txt = Path(self.ponce_repo_path, self.ponce_txt) + if sbo_file_txt.is_file(): + sbo_file_txt.unlink() + + # Generating the ponce SLACKBUILDS.TXT file. print(f'Generating the {self.ponce_txt} file... ', end='', flush=True) os.chdir(self.ponce_repo_path) subprocess.call(f'./gen_sbo_txt.sh > {self.ponce_txt}', shell=True)