mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 15:03:44 +02:00
mk: move git check to init.sh xbmk_set_version
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -165,6 +165,11 @@ xbmk_set_version()
|
|||||||
eval "[ ! -f \".$fv\" ] || read -r $fv < \".$fv\" || :"
|
eval "[ ! -f \".$fv\" ] || read -r $fv < \".$fv\" || :"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for g in "command -v git" "git config --global user.name" \
|
||||||
|
"git config --global user.email"; do
|
||||||
|
eval "$g 1>/dev/null 2>/dev/null || $err \"Unconfigured: $g\""
|
||||||
|
done
|
||||||
|
|
||||||
[ -e ".git" ] || [ -f ".version" ] || printf "unknown\n" > .version \
|
[ -e ".git" ] || [ -f ".version" ] || printf "unknown\n" > .version \
|
||||||
|| $err "Cannot generate unknown .version file"
|
|| $err "Cannot generate unknown .version file"
|
||||||
[ -e ".git" ] || [ -f ".versiondate" ] || printf "1716415872\n" > \
|
[ -e ".git" ] || [ -f ".versiondate" ] || printf "1716415872\n" > \
|
||||||
|
|||||||
@@ -23,11 +23,6 @@ main()
|
|||||||
{
|
{
|
||||||
cmd="" && [ $# -gt 0 ] && cmd="$1" && shift 1
|
cmd="" && [ $# -gt 0 ] && cmd="$1" && shift 1
|
||||||
|
|
||||||
for g in "command -v git" "git config --global user.name" \
|
|
||||||
"git config --global user.email"; do
|
|
||||||
eval "$g 1>/dev/null 2>/dev/null || $err \"Unconfigured: $g\""
|
|
||||||
done
|
|
||||||
|
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
version) printf "%s\nWebsite: %s\n" "$relname" "$projectsite" ;;
|
version) printf "%s\nWebsite: %s\n" "$relname" "$projectsite" ;;
|
||||||
release|download|inject) $cmd "$@" ;;
|
release|download|inject) $cmd "$@" ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user