Updated for ponce repo

This commit is contained in:
Dimitris Zlatanidis 2023-03-01 22:59:09 +02:00
parent 349c74b63f
commit a2d478e3e2
2 changed files with 5 additions and 3 deletions

View file

@ -81,8 +81,8 @@
# Default is true. [true/false]. # Default is true. [true/false].
ASCII_CHARACTERS = true ASCII_CHARACTERS = true
# Set the 'PONCE_REPO = true' to switch with the ponce repository. # Set the 'PONCE_REPO = true' and 'DOWNLOADER = lftp' to switch with
# Do not unset SBO_REPO_URL and SBO_TXT. # the ponce repository. Do not unset SBO_REPO_URL and SBO_TXT.
# NOTE: Ponce repository works only with 'lftp' downloader. # NOTE: Ponce repository works only with 'lftp' downloader.
######################################################################### #########################################################################
# This is not going to fully support this repository, since it does not # # This is not going to fully support this repository, since it does not #

View file

@ -52,7 +52,8 @@ class Downloader(Configs, Utilities):
stdout=self.stdout) stdout=self.stdout)
elif self.downloader == 'lftp': elif self.downloader == 'lftp':
if 'ponce' in self.url: if self.ponce_repo and 'ponce' in self.url:
# Download files from a directory.
self.output = subprocess.call(f"lftp {self.lftp_mirror_options} {self.url} {self.path}", self.output = subprocess.call(f"lftp {self.lftp_mirror_options} {self.url} {self.path}",
shell=True, stderr=self.stderr, stdout=self.stdout) shell=True, stderr=self.stderr, stdout=self.stdout)
# Create /path/name.Slackbuild # Create /path/name.Slackbuild
@ -61,6 +62,7 @@ class Downloader(Configs, Utilities):
if slackbuild.is_file(): if slackbuild.is_file():
os.chmod(slackbuild, 0o775) os.chmod(slackbuild, 0o775)
else: else:
# Download binaries files and the sources.
self.output = subprocess.call(f"lftp {self.lftp_get_options} {self.url} -o {self.path}", self.output = subprocess.call(f"lftp {self.lftp_get_options} {self.url} -o {self.path}",
shell=True, stderr=self.stderr, stdout=self.stdout) shell=True, stderr=self.stderr, stdout=self.stdout)