diff options
author | Patrick Spek <p.spek@tyil.nl> | 2022-04-20 12:08:39 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2022-04-20 12:08:39 +0200 |
commit | 333ba3fbe568dd62bd9bc687e56975c06a2b85b5 (patch) | |
tree | 8d537612ea0d7b1cb8599165c24db8ca32c0e8a2 | |
parent | 0210dd476c9f202a0fd0e8644a0e35a1bd95bff9 (diff) |
Silence output of pushd/popd
-rw-r--r-- | lib/subcommands/sync.bash | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/subcommands/sync.bash b/lib/subcommands/sync.bash index 4c193e1..9537922 100644 --- a/lib/subcommands/sync.bash +++ b/lib/subcommands/sync.bash @@ -16,9 +16,9 @@ subcommand() fi notice "bashtard/sync" "Syncing $BASHTARD_ETCDIR" - pushd -- "$BASHTARD_ETCDIR" - git pull origin master - popd + pushd -- "$BASHTARD_ETCDIR" > /dev/null + git pull origin master || return 4 + popd > /dev/null # Otherwise, do a full sync notice "bashtard/sync" "Syncing remote playbooks" @@ -26,10 +26,10 @@ subcommand() # Update all playbook sources while read -r playbook _ branch do - pushd -- "$BASHTARD_ETCDIR/playbooks.d/$playbook" \ + pushd -- "$BASHTARD_ETCDIR/playbooks.d/$playbook" > /dev/null \ || return 2 git pull origin "$branch" - popd + popd > /dev/null done < "$BASHTARD_ETCDIR/playbooks.d/remotes" # Run a sync for each registered playbook for this host |