From b1d8c452bad280def80280cfb3f972b88ce42805 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Wed, 3 Aug 2022 15:35:00 +0200
Subject: Update playbook for user-tyil
---
playbooks.d/user-tyil/playbook.bash | 8 ++++++--
1 file 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
}
--
cgit v1.1