Commit 4463320e by Mislav Marohnić

Print OS information on build failure

This is useful info for when someone is pasting build output to our
issue tracker seeking support.
parent 95964b17
...@@ -71,10 +71,21 @@ colorize() { ...@@ -71,10 +71,21 @@ colorize() {
fi fi
} }
os_information() {
if type -p lsb_release >/dev/null; then
lsb_release -sir | xargs echo
elif type -p sw_vers >/dev/null; then
echo "OS X $(sw_vers -productVersion)"
else
local os="$(cat /etc/{centos,redhat,fedora,system}-release /etc/debian_version 2>/dev/null | head -1)"
echo "${os:-$(uname -sr)}"
fi
}
build_failed() { build_failed() {
{ echo { echo
colorize 1 "BUILD FAILED" colorize 1 "BUILD FAILED"
echo " ($(version))" echo " ($(os_information) using $(version))"
echo echo
if ! rmdir "${BUILD_PATH}" 2>/dev/null; then if ! rmdir "${BUILD_PATH}" 2>/dev/null; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment