diff options
author | Leah Rowe <leah@libreboot.org> | 2024-05-25 16:56:44 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-05-25 16:56:44 +0100 |
commit | 48c2cef800eb6153f953f298a2d04e43577d6000 (patch) | |
tree | 822b865863b2a2c05841a2dfe1846c09bcdfaea7 | |
parent | db06bbdb6e4b60d710f5cabe7b637d4737726119 (diff) |
build: simplify git_init()
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-x | build | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -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() |