~janbaudisch/git-mirror

eb9a4bc9b029dce67f0b1f99302a2d71b5bed538 — Jan Baudisch 4 years ago 7b4c3a6 0.1.1
propagate error codes from subshells
1 files changed, 3 insertions(+), 3 deletions(-)

M git-mirror
M git-mirror => git-mirror +3 -3
@@ 64,7 64,7 @@ setup() {

    echo ""
    echo "Adding mirror remote ..."
    $(cd $path && git remote add --mirror=fetch mirror $mirror)
    $(cd $path && git remote add --mirror=fetch mirror $mirror) || exit $?

    echo ""
    echo "Mirror directory set up."


@@ 87,11 87,11 @@ update() {
    check_git

    echo "Fetching primary ..."
    $(cd $path && git fetch origin)
    $(cd $path && git fetch origin) || exit $?

    echo ""
    echo "Pushing to mirror ..."
    $(cd $path && git push mirror --all)
    $(cd $path && git push mirror --all) || exit $?

    echo ""
    echo "Mirror up to date."