mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-07 11:20:14 +00:00
configure: compute a simpler version string
Compute a simpler, yet still completely descriptive, version string. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
parent
a37a585637
commit
66cf16ec46
20
configure
vendored
20
configure
vendored
@ -550,21 +550,19 @@ if [ -n "${V}" ]; then
|
|||||||
else
|
else
|
||||||
case "${VERSION}" in
|
case "${VERSION}" in
|
||||||
*+hg|hg)
|
*+hg|hg)
|
||||||
REVISION="$( hg id -n 2>/dev/null || true )"
|
rev_id="$( hg log -r . --template '{branch}:{node|short}\n' \
|
||||||
case "${REVISION}" in
|
2>/dev/null \
|
||||||
"")
|
|| true \
|
||||||
VERSION="${VERSION}_unknown@$( date +%Y%m%d.%H%M%S )";;
|
)"
|
||||||
*)
|
VERSION="${VERSION}@${rev_id:-unknown:$( date +%Y%m%d.%H%M%S )}"
|
||||||
VERSION="${VERSION}_$( hg id -b )@${REVISION%%+}_$( hg id -i )"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
# Arrange to have no / in the directory name, no need to create an
|
|
||||||
# arbitrarily deep directory structure
|
|
||||||
VERSION="$( printf "${VERSION}\n" |"${sed}" -r -e 's|/+|_|g;' )"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Arrange to have no / in the directory name, no need to create an
|
||||||
|
# arbitrarily deep directory structure
|
||||||
|
VERSION="$( printf "${VERSION}" |"${sed}" -r -e 's:/+:_:g;' )"
|
||||||
|
|
||||||
printf "${VERSION}\n"
|
printf "${VERSION}\n"
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user