summaryrefslogtreecommitdiff
path: root/playbooks.d/user-tyil
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-08-03 15:35:00 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-08-03 15:35:14 +0200
commitb1d8c452bad280def80280cfb3f972b88ce42805 (patch)
tree32a9cea05ea5d0b14632be17cfd24c0d113317fe /playbooks.d/user-tyil
parent073dc36f359d5200eb8150706b7a7090c11781c5 (diff)
Update playbook for user-tyil
Diffstat (limited to 'playbooks.d/user-tyil')
-rw-r--r--playbooks.d/user-tyil/playbook.bash8
1 files changed, 6 insertions, 2 deletions
diff --git a/playbooks.d/user-tyil/playbook.bash b/playbooks.d/user-tyil/playbook.bash
index 282e0ea..b7c1a83 100644
--- a/playbooks.d/user-tyil/playbook.bash
+++ b/playbooks.d/user-tyil/playbook.bash
@@ -32,7 +32,11 @@ playbook_sync() {
then
notice "$BASHTARD_PLAYBOOK" "Updating dotfiles"
sudo -u tyil \
+ git -C "$(config "users.tyil.home")" stash
+ sudo -u tyil \
git -C "$(config "users.tyil.home")" pull origin "$(config "users.tyil.git.branch")"
+ sudo -u tyil \
+ git -C "$(config "users.tyil.home")" stash pop
fi
notice "$BASHTARD_PLAYBOOK" "Updating all 3rd party git repositories"
@@ -54,8 +58,8 @@ playbook_sync() {
"$dir/$name"
fi
- git -C "$dir/$name" checkout "$branch"
- git -C "$dir/$name" pull "$repo" "$branch"
+ sudo -u tyil git -C "$dir/$name" checkout "$branch"
+ sudo -u tyil git -C "$dir/$name" pull "$repo" "$branch"
done
done
}