From 653a93002f797bcadc7e2797a3f65bf23e308322 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Mon, 23 May 2022 13:27:30 +0200 Subject: Sync dotfiles before syncing git remotes --- playbooks.d/user-tyil/playbook.bash | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'playbooks.d') 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() { -- cgit v1.1