summaryrefslogtreecommitdiff
path: root/playbooks.d/user-tyil
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-05-23 13:27:30 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-05-23 13:27:30 +0200
commit653a93002f797bcadc7e2797a3f65bf23e308322 (patch)
tree6dbe3b84ddb21cbc366ac831a3d549bfef5ec68d /playbooks.d/user-tyil
parentf38336a6a043e77d972ed1314ac60055ecdbef4f (diff)
Sync dotfiles before syncing git remotes
Diffstat (limited to 'playbooks.d/user-tyil')
-rw-r--r--playbooks.d/user-tyil/playbook.bash13
1 files changed, 7 insertions, 6 deletions
diff --git a/playbooks.d/user-tyil/playbook.bash b/playbooks.d/user-tyil/playbook.bash
index 393c099..282e0ea 100644
--- a/playbooks.d/user-tyil/playbook.bash
+++ b/playbooks.d/user-tyil/playbook.bash
@@ -28,6 +28,13 @@ playbook_sync() {
pkg install "$package"
done
+ if [[ $BASHTARD_COMMAND != "add" ]]
+ then
+ notice "$BASHTARD_PLAYBOOK" "Updating dotfiles"
+ sudo -u tyil \
+ git -C "$(config "users.tyil.home")" pull origin "$(config "users.tyil.git.branch")"
+ fi
+
notice "$BASHTARD_PLAYBOOK" "Updating all 3rd party git repositories"
grep -v '^#' "$sharedir/gittab" | while read -r tab dir
do
@@ -51,12 +58,6 @@ playbook_sync() {
git -C "$dir/$name" pull "$repo" "$branch"
done
done
-
- [[ $BASHTARD_COMMAND == "add" ]] && return
-
- notice "$BASHTARD_PLAYBOOK" "Updating dotfiles"
- sudo -u tyil \
- git -C "$(config "users.tyil.home")" pull origin "$(config "users.tyil.git.branch")"
}
playbook_del() {