Skip to content

Commit f927e47

Browse files
committed
cue: install apt packages from APT on linux
1 parent fbd6bac commit f927e47

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cue.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ def detect_context():
7171
if 'CHOCO' in os.environ:
7272
ci['choco'].extend(os.environ['CHOCO'].split())
7373

74+
if 'APT' in os.environ:
75+
ci['apt'].extend(os.environ['APT'].split())
76+
7477
ci['test'] = True
7578
if 'TEST' in os.environ and os.environ['TEST'].lower() == 'no':
7679
ci['test'] = False
@@ -126,6 +129,7 @@ def clear_lists():
126129
ci['configuration'] = '<unknown>'
127130
ci['scriptsdir'] = ''
128131
ci['choco'] = ['make']
132+
ci['apt'] = []
129133

130134

131135
clear_lists()
@@ -822,6 +826,11 @@ def prepare(args):
822826
sp.check_call(['choco', 'install'] + ci['choco'])
823827
fold_end('install.choco', 'Installing CHOCO packages')
824828

829+
if ci['os'] == 'linux' and ci['apt']:
830+
fold_start('install.apt', 'Installing APT packages')
831+
sp.check_call(['sudo', 'apt-get', '-y', 'install'] + ci['apt'])
832+
fold_end('install.apt', 'Installing APT packages')
833+
825834
if ci['os'] == 'linux' and 'RTEMS' in os.environ:
826835
tar_name = 'i386-rtems{0}-trusty-20171203-{0}.tar.bz2'.format(os.environ['RTEMS'])
827836
print('Downloading RTEMS {0} cross compiler: {1}'

0 commit comments

Comments
 (0)