diff options
author | Patrick Spek <p.spek@tyil.nl> | 2023-03-08 10:04:12 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2023-03-08 10:04:12 +0100 |
commit | fdef03a6176461256ad2b165008131d63582add9 (patch) | |
tree | ed921fd27ffa18c5a1a012941341df72096af2fa /lib/subcommands/pull.bash | |
parent | 61e464e037a7436a2ac050fac8258094ba095514 (diff) |
Split pull functionality into its own subcommand
Diffstat (limited to 'lib/subcommands/pull.bash')
-rw-r--r-- | lib/subcommands/pull.bash | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/subcommands/pull.bash b/lib/subcommands/pull.bash new file mode 100644 index 0000000..4061f1b --- /dev/null +++ b/lib/subcommands/pull.bash @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# SPDX-FileCopyrightText: 2023 Patrick Spek <p.spek@tyil.nl> +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +subcommand() +{ + notice "bashtard/pull" "Pulling latest changes in $BASHTARD_ETCDIR" + + git -C "$BASHTARD_ETCDIR" stash + git -C "$BASHTARD_ETCDIR" pull origin master || return 4 + git -C "$BASHTARD_ETCDIR" submodule update --recursive --remote || return 4 + git -C "$BASHTARD_ETCDIR" stash pop +} |