Call chmod after 'git pull'

Similar to clone, the umask is not honored. Fix with recursive
chmod.
This commit is contained in:
0x1eef 2024-04-20 03:18:10 -03:00
parent 105b4f6594
commit 6250b5f995

View file

@ -51,8 +51,9 @@ cd "${gitdir}"
remote=$("${git}" remote | head -n1) remote=$("${git}" remote | head -n1)
if [ "$(git branch --show-current)" != "${branch}" ]; then if [ "$(git branch --show-current)" != "${branch}" ]; then
change_branch "${remote}" "${branch}" change_branch "${remote}" "${branch}"
echo "[-] Adjust filemode. This might take a while"
doas -u root /bin/chmod -R "${mode}" "${gitdir}"
fi fi
set -x set -x
doas -u _portzap "${git}" pull --rebase "${remote}" "${branch}" doas -u _portzap "${git}" pull --rebase "${remote}" "${branch}"
set +x
echo "[-] Adjust filemode. This might take a while"
doas -u root /bin/chmod -R "${mode}" "${gitdir}"