mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Updated for gen sbo
This commit is contained in:
parent
32dc5ccda3
commit
b65dcb0ec5
1 changed files with 23 additions and 16 deletions
|
@ -634,21 +634,8 @@ class UpdateRepository(Configs):
|
||||||
|
|
||||||
self.utils.process(lftp_command)
|
self.utils.process(lftp_command)
|
||||||
|
|
||||||
gen_script: Path = Path(self.repos.ponce_repo_path, 'gen_sbo_txt.sh')
|
self.generate_the_slackbuilds_txt(self.repos.ponce_repo_path, self.repos.ponce_repo_slackbuilds)
|
||||||
if not gen_script.is_file():
|
|
||||||
with open(gen_script, 'w') as file:
|
|
||||||
file.write(self.__class__.gen_sbo_script.__doc__)
|
|
||||||
|
|
||||||
os.chmod(gen_script, 0o775)
|
|
||||||
|
|
||||||
# Generating the ponce SLACKBUILDS.TXT file.
|
|
||||||
print(f'Generating the {self.repos.ponce_repo_slackbuilds} file... ', end='', flush=True)
|
|
||||||
os.chdir(self.repos.ponce_repo_path)
|
|
||||||
gen_command: str = f'./gen_sbo_txt.sh > {self.repos.ponce_repo_slackbuilds}'
|
|
||||||
|
|
||||||
self.utils.process(gen_command)
|
|
||||||
self.delete_last_updated(self.repos.ponce_repo_name)
|
self.delete_last_updated(self.repos.ponce_repo_name)
|
||||||
print('\n')
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if not self.option_for_install_data:
|
if not self.option_for_install_data:
|
||||||
|
@ -730,7 +717,27 @@ class UpdateRepository(Configs):
|
||||||
self.session.query(LastRepoUpdated).where(LastRepoUpdated.repo == repo).delete()
|
self.session.query(LastRepoUpdated).where(LastRepoUpdated.repo == repo).delete()
|
||||||
self.session.commit()
|
self.session.commit()
|
||||||
|
|
||||||
def gen_sbo_script(self):
|
def generate_the_slackbuilds_txt(self, path: Path, slackbuilds_txt: str) -> None:
|
||||||
|
""" Generates the SLACKBUILDS.TXT file. """
|
||||||
|
|
||||||
|
sbo_txt: Path = Path(path, slackbuilds_txt)
|
||||||
|
gen_script: Path = Path(path, 'gen_sbo_txt.sh')
|
||||||
|
|
||||||
|
if not sbo_txt.is_file():
|
||||||
|
|
||||||
|
if not gen_script.is_file():
|
||||||
|
with open(gen_script, 'w') as file:
|
||||||
|
file.write(self.__class__.gen_sbo_script.__doc__)
|
||||||
|
os.chmod(gen_script, 0o775)
|
||||||
|
|
||||||
|
# Generating the SLACKBUILDS.TXT file.
|
||||||
|
print(f'Generating the {slackbuilds_txt} file... ', end='', flush=True)
|
||||||
|
os.chdir(path)
|
||||||
|
self.utils.process(f'./gen_sbo_txt.sh > {slackbuilds_txt}')
|
||||||
|
|
||||||
|
print(f'{self.byellow}Done{self.endc}\n')
|
||||||
|
|
||||||
|
def gen_sbo_script(self) -> None:
|
||||||
"""#!/bin/bash
|
"""#!/bin/bash
|
||||||
|
|
||||||
# gen_sbo_txt.sh is a script to build a SLACKBUILDS.TXT file.
|
# gen_sbo_txt.sh is a script to build a SLACKBUILDS.TXT file.
|
||||||
|
|
Loading…
Add table
Reference in a new issue