mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-03 06:56:44 +01:00
Fix download jdk
This commit is contained in:
parent
2aad390523
commit
84ef805998
1 changed files with 9 additions and 0 deletions
|
@ -45,6 +45,8 @@ class Download(object):
|
||||||
dwn_count = 1
|
dwn_count = 1
|
||||||
for dwn in self.url:
|
for dwn in self.url:
|
||||||
self.file_name = dwn.split("/")[-1]
|
self.file_name = dwn.split("/")[-1]
|
||||||
|
self._check_certificate()
|
||||||
|
print self.wget_options
|
||||||
print("\n[{0}/{1}][ {2}Download{3} ] --> {4}\n".format(
|
print("\n[{0}/{1}][ {2}Download{3} ] --> {4}\n".format(
|
||||||
dwn_count, len(self.url), self.meta.color["GREEN"],
|
dwn_count, len(self.url), self.meta.color["GREEN"],
|
||||||
self.meta.color["ENDC"],
|
self.meta.color["ENDC"],
|
||||||
|
@ -69,3 +71,10 @@ class Download(object):
|
||||||
print("")
|
print("")
|
||||||
if not Msg().answer() in ["y", "Y"]:
|
if not Msg().answer() in ["y", "Y"]:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
def _check_certificate(self):
|
||||||
|
"""Check sources like jdk for extra options for wget
|
||||||
|
"""
|
||||||
|
if self.file_name.startswith("jdk-"):
|
||||||
|
self.wget_options += (" --no-check-certificate --header='Cookie: "
|
||||||
|
"oraclelicense=accept-securebackup-cookie'")
|
||||||
|
|
Loading…
Reference in a new issue