Pull out base url

This commit is contained in:
Marcel Schwarz 2020-03-11 00:29:55 +01:00
parent df127f63e2
commit 2a2805150e

View File

@ -45,14 +45,11 @@ class ToolsInstaller:
print("Version not supported by this installer") print("Version not supported by this installer")
return return
subprocess.run("curl -fsSL " base_url = f"https://download.docker.com/linux/${linux_distro}"
f"https://download.docker.com/linux/${linux_distro}/gpg "
"| sudo apt-key add -", subprocess.run("curl -fsSL " + base_url + "/gpg | sudo apt-key add -", shell=True)
shell=True)
subprocess.run("apt-key fingerprint 0EBFCD88", shell=True) subprocess.run("apt-key fingerprint 0EBFCD88", shell=True)
subprocess.run("add-apt-repository \"deb [arch=amd64] " subprocess.run("add-apt-repository \"deb [arch=amd64] " + base_url + " $(lsb_release -cs) stable\"",
f"https://download.docker.com/linux/${linux_distro}"
"$(lsb_release -cs) stable\"",
shell=True) shell=True)
else: else:
print("skip adding of the key") print("skip adding of the key")