mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
init.sh: bail if date is non-GNU (for now)
We currently use GNU-only options in the date command, when initialising a Git repository. This isn't a problem in practise, on non-GNU implementations if not initialising a Git repository, because it's only used in that situation. In practise, only those systems with GNU coreutils and libc are used to compile releases, so this is OK for me at least. Future portability improvements will correct the issue, and then this error check can be removed. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -252,6 +252,10 @@ xbmk_git_init()
|
||||
|
||||
[ -L ".git" ] && err "'$xbmkpwd/.git' is a symlink"
|
||||
[ -e ".git" ] && return 0
|
||||
|
||||
x_ date --version | grep "GNU coreutils" 1>/dev/null 2>/dev/null || \
|
||||
err "Non-GNU date implementation; current use relies on GNU date"
|
||||
|
||||
eval "`setvars "$(date -Rud @$versiondate)" cdate _nogit`"
|
||||
|
||||
x_ git init 1>/dev/null 2>/dev/null
|
||||
|
||||
Reference in New Issue
Block a user