summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}