aboutsummaryrefslogtreecommitdiff
path: root/lib/subcommands/pull.bash
blob: 4061f1b3bcdb0ed8257def152a0666fa511b51c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
}