Merge branch 'features/sbang' into develop

Conflicts:
	lib/spack/llnl/util/filesystem.py
This commit is contained in:
Todd Gamblin
2016-03-06 19:30:19 -08:00
3 changed files with 171 additions and 1 deletions

View File

@@ -25,7 +25,8 @@
__all__ = ['set_install_permissions', 'install', 'install_tree', 'traverse_tree',
'expand_user', 'working_dir', 'touch', 'touchp', 'mkdirp',
'force_remove', 'join_path', 'ancestor', 'can_access', 'filter_file',
'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink', 'remove_dead_links', 'remove_linked_tree']
'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink',
'remove_dead_links', 'remove_linked_tree', 'copy_mode', 'unset_executable_mode']
import os
import sys
@@ -158,6 +159,14 @@ def copy_mode(src, dest):
os.chmod(dest, dest_mode)
def unset_executable_mode(path):
mode = os.stat(path).st_mode
mode &= ~stat.S_IXUSR
mode &= ~stat.S_IXGRP
mode &= ~stat.S_IXOTH
os.chmod(path, mode)
def install(src, dest):
"""Manually install a file to a particular location."""
tty.debug("Installing %s to %s" % (src, dest))