aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsetpill <37372069+setpill@users.noreply.github.com>2021-01-25 15:33:07 +0100
committersetpill <37372069+setpill@users.noreply.github.com>2021-01-25 15:33:07 +0100
commit624091b7b97ed371900ca7c68f3e2929954e3464 (patch)
tree50cf431d67bccc250fb8ff52d1390456ff6e6856
parentd0852f39a7a3bfbb36437ef20bf94c263cad632a (diff)
Fix docker args conditional
-rwxr-xr-xcontrib/gitian-build.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/contrib/gitian-build.py b/contrib/gitian-build.py
index f105968515..06b15574a7 100755
--- a/contrib/gitian-build.py
+++ b/contrib/gitian-build.py
@@ -13,15 +13,16 @@ def setup():
programs = ['ruby', 'git', 'make', 'wget', 'curl']
if args.kvm:
programs += ['apt-cacher-ng', 'python-vm-builder', 'qemu-kvm', 'qemu-utils']
- elif args.docker and not os.path.isfile('/lib/systemd/system/docker.service'):
- dockers = ['docker.io', 'docker-ce']
- for i in dockers:
- return_code = subprocess.call(['sudo', 'apt-get', 'install', '-qq', i])
- if return_code == 0:
- break
- if return_code != 0:
- print('Cannot find any way to install Docker.', file=sys.stderr)
- sys.exit(1)
+ elif args.docker:
+ if not os.path.isfile('/lib/systemd/system/docker.service'):
+ dockers = ['docker.io', 'docker-ce']
+ for i in dockers:
+ return_code = subprocess.call(['sudo', 'apt-get', 'install', '-qq', i])
+ if return_code == 0:
+ break
+ if return_code != 0:
+ print('Cannot find any way to install Docker.', file=sys.stderr)
+ sys.exit(1)
else:
programs += ['apt-cacher-ng', 'lxc', 'debootstrap']
subprocess.check_call(['sudo', 'apt-get', 'install', '-qq'] + programs)