You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
856 B

#!/usr/bin/env python3
# TODO: modify to automatically update sudoers.d/file
import re
sudo_cmds = []
# All of these commands...
cmds = ['/usr/bin/extra-x86_64-build',
# Should allow all of these args.
args = ['-c',
'-c -- -- --skippgpcheck --syncdeps --noconfirm --log --holdver --skipinteg',
'-- -- --skippgpcheck --syncdeps --noconfirm --log --holdver --skipinteg']
for c in cmds:
for a in args:
sudo_cmds.append('{0} {1}'.format(c, a))
s = ''
s += 'Cmnd_Alias\tPKGBUILDER = \\\n'
for c in sudo_cmds:
s += '\t\t\t\t{0}, \\\n'.format(c)
s = re.sub(r', \\s*$', '', s)