With the 'install_mode' kwarg, you can now specify the file and directory permissions and the owner and the group to be used while installing. You can pass either: * A single string specifying just the permissions * A list of strings with: - The first argument a string of permissions - The second argument a string specifying the owner or an int specifying the uid - The third argument a string specifying the group or an int specifying the gid Specifying `false` as any of the arguments skips setting that one. The format of the permissions kwarg is the same as the symbolic notation used by ls -l with the first character that specifies 'd', '-', 'c', etc for the file type omitted since that is always obvious from the context. Includes unit tests for the same. Sadly these only run on Linux right now, but we want them to run on all platforms. We do set the mode in the integration tests for all platforms but we don't check if they were actually set correctly.pull/1302/head
parent
905ff35611
commit
7d6f628ed4
12 changed files with 277 additions and 17 deletions
@ -0,0 +1,3 @@ |
||||
#!/bin/sh |
||||
|
||||
echo "Runscript" |
@ -1,5 +1,7 @@ |
||||
project('install a whole subdir', 'c') |
||||
|
||||
subdir('subdir') |
||||
install_subdir('sub1', install_dir : 'share') |
||||
# A subdir with write perms only for the owner |
||||
# and read-list perms for owner and group |
||||
install_subdir('sub1', install_dir : 'share', install_mode : ['rwxr-x--t', 'root']) |
||||
install_subdir('sub/sub1', install_dir : 'share') |
||||
|
@ -1 +1,3 @@ |
||||
install_subdir('sub1', install_dir : 'share') |
||||
install_subdir('sub1', install_dir : 'share', |
||||
# This mode will be overriden by the mode set in the outer install_subdir |
||||
install_mode : 'rwxr-x---') |
||||
|
Loading…
Reference in new issue