summaryrefslogtreecommitdiff
path: root/include/git.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-12-11 05:21:27 +0000
committerLeah Rowe <leah@libreboot.org>2023-12-11 05:21:27 +0000
commit2e779a54951406247197cf21a31c54a36ec1fa06 (patch)
tree381d1b71893bcbeae5f7029379174cbe31c97a1a /include/git.sh
parent9558e2fce790b044c33c54dfc58780a66e98b770 (diff)
handle errors on exits from subshells
most of these are probably redundant, and will never be called, but lbmk needs to be as safe as possible under fault conditions. fail early, fail hard. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/git.sh')
-rwxr-xr-xinclude/git.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/git.sh b/include/git.sh
index 49148224..811b298a 100755
--- a/include/git.sh
+++ b/include/git.sh
@@ -72,7 +72,7 @@ prepare_new_tree()
git submodule update --init --checkout || \
err "prepare_new_tree ${project}/${tree}: !submodules"
fi
- )
+ ) || err "git submodule update failure"
git_am_patches "${tmp_git_dir}" "$PWD/$cfgsdir/$tree/patches" || \
err "prepare_new_tree ${project}/${tree}: patch fail"
[ "${patchfail}" = "y" ] && err "PATCH FAIL"
@@ -138,7 +138,7 @@ git_reset_rev()
git submodule update --init --checkout || \
err "git_reset_rev ${1}: can't download submodules"
fi
- )
+ ) || err "git reset fail"
}
git_am_patches()