mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-09-20 13:40:24 +02:00
init.sh: portable date on git-init
don't even call the date util at all, to fix the portability issues. now we don't need GNU date anymore. git itself can just take an epoch, and it will do whatever it will do. yes. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+1
-10
@@ -424,19 +424,10 @@ xbmk_git_init()
|
||||
[ -e ".git" ] && \
|
||||
return 0
|
||||
|
||||
# GNU-specific extensions of date are used.
|
||||
# TODO: that is a bug. fix it!
|
||||
|
||||
x_ date --version | grep "GNU coreutils" 1>/dev/null 2>/dev/null || \
|
||||
err "Non-GNU date implementation" "xbmk_git_init" "$@"
|
||||
|
||||
cdate="`x_ date -Rud @$versiondate || err "can't get date"`" || \
|
||||
err "can't get date" "xbmk_git_init" "$@"
|
||||
|
||||
x_ git init 1>/dev/null 2>/dev/null
|
||||
x_ git add -A . 1>/dev/null 2>/dev/null
|
||||
x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \
|
||||
commit -m "$projectname $version" --date "$cdate" \
|
||||
commit -m "$projectname $version" --date "@$versiondate +0000" \
|
||||
--author="xbmk <xbmk@example.com>" 1>/dev/null 2>/dev/null
|
||||
x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \
|
||||
tag -a "$version" -m "$projectname $version" \
|
||||
|
||||
Reference in New Issue
Block a user