4 Commits

Author SHA1 Message Date
balki 71e35ef5f5 root may or maynot be a symlink 2025-08-06 12:57:36 -04:00
balki 7b9fb215b9 shellcheck: add quotes 2024-12-11 10:32:28 -05:00
balki 81bb36ee48 change root to readlink root 2024-11-28 14:11:23 -05:00
balki a7052b04a7 make root a link 2024-11-26 14:43:19 -05:00
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -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 $(shell basename $(shell readlink -f 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 $(shell basename $(shell readlink -f root)) -type d | xargs sudo setfacl -m "u:${USER}:rwx"
find $(shell basename $(shell readlink -f root)) -type f | xargs sudo setfacl -m "u:${USER}:r"
.PHONY: skel
skel: ## Creates common directories needed
+2 -2
View File
@@ -10,8 +10,8 @@ Initial setup
mkdir myfiles
cd myfiles
git init
git submodule add https://gitlab.com/balki/makepac'
echo "include makepac/Makefile" > Makefile'
git submodule add https://gitlab.com/balki/makepac
echo "include makepac/Makefile" > Makefile
sudo apt install acl
make skel
git add .
+2 -2
View File
@@ -1,9 +1,9 @@
#!/usr/bin/bash
root="root"
root=$(basename $(readlink -f root))
all_files() {
find $root -type f,l
find "$root" -type f,l
}
for f in $(all_files)