mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-22 05:00:08 +02:00
lbmk: support showing the revision in help text
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -65,8 +65,15 @@ initialise_command()
|
|||||||
check_project
|
check_project
|
||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
help) usage ${0} && lbmk_exit 0 ;;
|
help)
|
||||||
list) items "${buildpath}" && lbmk_exit 0 ;;
|
usage ${0}
|
||||||
|
lbmk_exit 0 ;;
|
||||||
|
list)
|
||||||
|
items "${buildpath}"
|
||||||
|
lbmk_exit 0 ;;
|
||||||
|
version)
|
||||||
|
mkversion
|
||||||
|
lbmk_exit 0 ;;
|
||||||
esac
|
esac
|
||||||
option="${1}"
|
option="${1}"
|
||||||
}
|
}
|
||||||
@@ -116,15 +123,26 @@ usage()
|
|||||||
{
|
{
|
||||||
progname=${0}
|
progname=${0}
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
|
$(mkversion)
|
||||||
|
|
||||||
USAGE: ${progname} <OPTION>
|
USAGE: ${progname} <OPTION>
|
||||||
|
|
||||||
possible values for 'OPTION':
|
possible values for 'OPTION':
|
||||||
$(items "${buildpath}")
|
$(items "${buildpath}")
|
||||||
|
|
||||||
|
To know whot ${projectname} version you're on, type:
|
||||||
|
${progname} version
|
||||||
|
|
||||||
Refer to ${projectname} documentation for more info.
|
Refer to ${projectname} documentation for more info.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mkversion()
|
||||||
|
{
|
||||||
|
printf "revision: %s %s\n" "${projectname}" "${version}"
|
||||||
|
printf "revision date: %s\n" "$(date -Rud @${versiondate})"
|
||||||
|
}
|
||||||
|
|
||||||
lbmk_exit()
|
lbmk_exit()
|
||||||
{
|
{
|
||||||
tmp_cleanup || err "lbmk_exit: can't rm tmpdir upon exit $1: ${tmpdir}"
|
tmp_cleanup || err "lbmk_exit: can't rm tmpdir upon exit $1: ${tmpdir}"
|
||||||
|
|||||||
Reference in New Issue
Block a user