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:
Thomas S Hatch 2014-04-07 23:29:29 -06:00
parent f02ed6ad47
commit 2df20719de

View file

@ -383,19 +383,24 @@ class Install(install):
class InstallLib(install_lib): class InstallLib(install_lib):
def run(self): def run(self):
executables = [
'salt/templates/git/ssh-id-wrapper',
'salt/templates/lxc/salt_tarball',
]
install_lib.run(self) install_lib.run(self)
# input and outputs match 1-1 # input and outputs match 1-1
inp = self.get_inputs() inp = self.get_inputs()
out = self.get_outputs() out = self.get_outputs()
chmod = []
#idx = inp.index('build/lib/salt/templates/git/ssh-id-wrapper')
for i, word in enumerate(inp): for i, word in enumerate(inp):
if word.endswith('salt/templates/git/ssh-id-wrapper'): for executeable in executables:
idx = i if word.endswith(executeable):
filename = out[idx] chmod.append(i)
for idx in chmod:
os.chmod(filename, 0755) filename = out[idx]
os.chmod(filename, 0755)
NAME = 'salt' NAME = 'salt'