aboutsummaryrefslogtreecommitdiff
path: root/lib/subcommands/sync.bash
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-03-08 10:04:12 +0100
committerPatrick Spek <p.spek@tyil.nl>2023-03-08 10:04:12 +0100
commitfdef03a6176461256ad2b165008131d63582add9 (patch)
treeed921fd27ffa18c5a1a012941341df72096af2fa /lib/subcommands/sync.bash
parent61e464e037a7436a2ac050fac8258094ba095514 (diff)
Split pull functionality into its own subcommand
Diffstat (limited to 'lib/subcommands/sync.bash')
-rw-r--r--lib/subcommands/sync.bash13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/subcommands/sync.bash b/lib/subcommands/sync.bash
index ed03faa..1ae2aae 100644
--- a/lib/subcommands/sync.bash
+++ b/lib/subcommands/sync.bash
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# SPDX-FileCopyrightText: 2022 Patrick Spek <p.spek@tyil.nl>
+# SPDX-FileCopyrightText: 2023 Patrick Spek <p.spek@tyil.nl>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
@@ -15,15 +15,8 @@ subcommand()
return
fi
- notice "bashtard/sync" "Syncing $BASHTARD_ETCDIR"
- pushd -- "$BASHTARD_ETCDIR" > /dev/null || return 4
-
- git stash
- git pull origin master || return 4
- git submodule update --recursive --remote || return 4
- git stash pop
-
- popd > /dev/null || return 4
+ # Pull latest changes
+ "$BASHTARD_BIN" pull
# Run a sync for each registered playbook for this host
while read -r playbook