diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2022-07-06 14:55:00 +0100 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2022-07-06 14:55:19 +0100 |
commit | ff7024d889732ca24eed0f40fcafbbc4963261e9 (patch) | |
tree | b596b7a26f84a4d97d2f0d4a90805804490de7a0 /build_common.sh | |
parent | 2482de6b02f02c4f25bdccb984c950a0f343fb22 (diff) |
Add Haiku specifics to build_common.sh. [skip ci]
Before: "OS identification: Haiku-UNKNOWN"
After: "OS identification: Haiku-hrev55181"
Diffstat (limited to 'build_common.sh')
-rw-r--r-- | build_common.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/build_common.sh b/build_common.sh index f65e6209..b5fa66b6 100644 --- a/build_common.sh +++ b/build_common.sh @@ -43,8 +43,8 @@ mktempdir() { mktempdir_diy "$mktempdir_prefix" ;; *) - # At least Linux and OpenBSD implementations require explicit trailing - # X'es in the template, so make it the same suffix as above. + # At least Haiku, Linux and OpenBSD implementations require explicit + # trailing X'es in the template, so make it the same suffix as above. mktemp -d -t "${mktempdir_prefix}.XXXXXXXX" ;; esac @@ -212,6 +212,13 @@ os_id() { # Meaningful version is usually the substring before the first dash. echo "$os_id_release" | sed 's/^\([0-9\.]*\).*$/\1/' ;; + Haiku) + # Meaningful version is the substring before the plus sign. + # "hrev55181" stands for "R1/beta3". + # "hrev54154" stands for "R1/beta2". + : "${os_id_version:=`uname -v`}" + echo "$os_id_version" | sed 's/^\(hrev.*\)+.*$/\1/' + ;; *) echo 'UNKNOWN' ;; |