build: print the project website address on help

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2-merge1
Leah Rowe 2024-06-02 23:34:10 +01:00 committed by Leah Rowe
parent ca0e9354f6
commit 1204bc3c96
2 changed files with 4 additions and 3 deletions

2
build
View File

@ -36,7 +36,7 @@ main()
done done
case "${1}" in case "${1}" in
version) printf "%s\n" "$relname" ;; version) printf "%s\nWebsite: %s\n" "$relname" "$projectsite" ;;
release) shift 1; mkrelease $@ ;; release) shift 1; mkrelease $@ ;;
*) *)
[ -f "$spath" ] || $err "Bad command. Check docs." [ -f "$spath" ] || $err "Bad command. Check docs."

View File

@ -32,7 +32,7 @@ setvars()
printf "%s\n" "${_setvars% }" printf "%s\n" "${_setvars% }"
} }
eval "$(setvars "" xbmk_release tmpdir _nogit version board boarddir relname \ eval "$(setvars "" xbmk_release tmpdir _nogit version board boarddir relname \
versiondate threads projectname)" versiondate threads projectname projectsite)"
# if "y": a coreboot target won't be built if target.cfg says release="n" # if "y": a coreboot target won't be built if target.cfg says release="n"
# (this is used to exclude certain build targets from releases) # (this is used to exclude certain build targets from releases)
@ -70,6 +70,7 @@ x_() {
$err "Cannot generate unknown versiondate file" $err "Cannot generate unknown versiondate file"
read -r projectname < projectname || : read -r projectname < projectname || :
read -r projectsite < projectsite || :
[ ! -f version ] || read -r version < version || : [ ! -f version ] || read -r version < version || :
version_="$version" version_="$version"
[ ! -e ".git" ] || version="$(git describe --tags HEAD 2>&1)" || \ [ ! -e ".git" ] || version="$(git describe --tags HEAD 2>&1)" || \
@ -78,7 +79,7 @@ version_="$version"
versiondate_="$versiondate" versiondate_="$versiondate"
[ ! -e ".git" ] || versiondate="$(git show --no-patch --no-notes \ [ ! -e ".git" ] || versiondate="$(git show --no-patch --no-notes \
--pretty='%ct' HEAD)" || versiondate="$versiondate_" --pretty='%ct' HEAD)" || versiondate="$versiondate_"
for p in projectname version versiondate; do for p in projectname version versiondate projectsite; do
eval "[ -n \"\$$p\" ] || $err \"$p unset\"" eval "[ -n \"\$$p\" ] || $err \"$p unset\""
eval "x_ printf \"%s\\n\" \"\$$p\" > $p" eval "x_ printf \"%s\\n\" \"\$$p\" > $p"
done done