Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
7b9fb215b9 | |||
81bb36ee48 | |||
a7052b04a7 |
6
Makefile
6
Makefile
@ -27,7 +27,7 @@ tmpfiles: ## Run this after editing files under tmpfiles.d
|
||||
|
||||
.PHONY: save-perms
|
||||
save-perms: ## Saves the file permissions to ./acl. Run this after adding new files with correct permissions
|
||||
getfacl --recursive root | ./makepac/sort_acl.sh > acl
|
||||
getfacl --recursive `readlink root` | ./makepac/sort_acl.sh > acl
|
||||
|
||||
.PHONY: set-perms
|
||||
set-perms: ## Restores permissions of all files from ./acl
|
||||
@ -35,8 +35,8 @@ set-perms: ## Restores permissions of all files from ./acl
|
||||
|
||||
.PHONY: user-perms
|
||||
user-perms: ## Grant running user all permissions. Need for git operations. Does not get copied to real filesystem
|
||||
find root -type f | xargs sudo setfacl -m "u:${USER}:r"
|
||||
find root -type d | xargs sudo setfacl -m "u:${USER}:rwx"
|
||||
find `readlink root` -type d | xargs sudo setfacl -m "u:${USER}:rwx"
|
||||
find `readlink root` -type f | xargs sudo setfacl -m "u:${USER}:r"
|
||||
|
||||
.PHONY: skel
|
||||
skel: ## Creates common directories needed
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
root="root"
|
||||
root=$(readlink root)
|
||||
|
||||
all_files() {
|
||||
find $root -type f,l
|
||||
find "$root" -type f,l
|
||||
}
|
||||
|
||||
for f in $(all_files)
|
||||
|
Loading…
x
Reference in New Issue
Block a user