mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Allow for more files to be more easily set to executable
This allows for files to just be listed and then BAM! They are installed executable
This commit is contained in:
parent
f02ed6ad47
commit
2df20719de
1 changed files with 11 additions and 6 deletions
17
setup.py
17
setup.py
|
@ -383,19 +383,24 @@ class Install(install):
|
|||
|
||||
class InstallLib(install_lib):
|
||||
def run(self):
|
||||
executables = [
|
||||
'salt/templates/git/ssh-id-wrapper',
|
||||
'salt/templates/lxc/salt_tarball',
|
||||
]
|
||||
install_lib.run(self)
|
||||
|
||||
# input and outputs match 1-1
|
||||
inp = self.get_inputs()
|
||||
out = self.get_outputs()
|
||||
chmod = []
|
||||
|
||||
#idx = inp.index('build/lib/salt/templates/git/ssh-id-wrapper')
|
||||
for i, word in enumerate(inp):
|
||||
if word.endswith('salt/templates/git/ssh-id-wrapper'):
|
||||
idx = i
|
||||
filename = out[idx]
|
||||
|
||||
os.chmod(filename, 0755)
|
||||
for executeable in executables:
|
||||
if word.endswith(executeable):
|
||||
chmod.append(i)
|
||||
for idx in chmod:
|
||||
filename = out[idx]
|
||||
os.chmod(filename, 0755)
|
||||
|
||||
|
||||
NAME = 'salt'
|
||||
|
|
Loading…
Add table
Reference in a new issue