summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-05-25 16:56:44 +0100
committerLeah Rowe <leah@libreboot.org>2024-05-25 16:56:44 +0100
commit48c2cef800eb6153f953f298a2d04e43577d6000 (patch)
tree822b865863b2a2c05841a2dfe1846c09bcdfaea7
parentdb06bbdb6e4b60d710f5cabe7b637d4737726119 (diff)
build: simplify git_init()
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xbuild15
1 files changed, 5 insertions, 10 deletions
diff --git a/build b/build
index 72318241..4e182ae3 100755
--- a/build
+++ b/build
@@ -68,20 +68,15 @@ install_packages()
git_init()
{
- [ -L ".git" ] && $err "Reference .git is a symlink"
+ [ -L ".git" ] && return 1
[ -e ".git" ] && return 0
eval "$(setvars "$(date -Rud @${versiondate})" cdate _nogit)"
- git init 1>/dev/null 2>/dev/null || \
- $err "${PWD}: cannot initialise Git repository"
- git add -A . 1>/dev/null 2>/dev/null || \
- $err "${PWD}: cannot add files to Git repository"
+ git init || return 1
+ git add -A . || return 1
git commit -m "${projectname} ${version}" --date "${cdate}" \
- --author="xbmk <xbmk@example.com>" 1>/dev/null 2>/dev/null || \
- $err "$PWD: can't commit ${projectname}/${version}, date $cdate"
- git tag -a "${version}" -m "${projectname} ${version}" \
- 1>/dev/null 2>/dev/null || \
- $err "${PWD}: cannot git-tag ${projectname}/${version}"
+ --author="xbmk <xbmk@example.com>" || return 1
+ git tag -a "${version}" -m "${projectname} ${version}" || return 1
}
mkrelease()