commit:     3dc783ba8ca5e07d25647bfaa2f12a49283873e1
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 13 19:21:43 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Jun 13 19:21:43 2019 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=3dc783ba

scripts/auto-bootstraps/dobootstrap: try to distinguish linux hosts

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 scripts/auto-bootstraps/dobootstrap | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/auto-bootstraps/dobootstrap 
b/scripts/auto-bootstraps/dobootstrap
index c7f471315d..5306491bc8 100755
--- a/scripts/auto-bootstraps/dobootstrap
+++ b/scripts/auto-bootstraps/dobootstrap
@@ -129,6 +129,18 @@ do_prepare() {
 
        if [[ -n ${DOPUBLISH} ]] ; then
                echo $((endtime - starttime)) > elapsedtime
+
+               # massage CHOST on Linux systems
+               if [[ ${chost} == *-linux-gnu* ]] ; then
+                       # two choices here: x86_64_ubuntu16-linux-gnu
+                       #                   x86_64-pc-linux-ubuntu16
+                       # I choose the latter because it is compatible with most
+                       # UNIX vendors
+                       local dist=$(lsb_release -si)
+                       local rel=$(lsb_release -sr)
+                       chost=${chost%%-*}-pc-linux-${dist,,}${rel}
+               fi
+
                ${keepalive} rsync -q /dev/null ${UPLOAD}/${HOSTNAME}-$$/
                ${keepalive} rsync -q /dev/null 
${UPLOAD}/${HOSTNAME}-$$/${chost}/
                ${keepalive} rsync -rltv \

Reply via email to