blob: 9aeea20d28b55dba7555b70406012337abd154e1 [file] [log] [blame]
Linux Foundation Administrators0fae4092018-01-29 10:58:36 -08001#!/bin/bash
2
3# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
4##############################################################################
5# Copyright (c) 2016 The Linux Foundation and others.
6#
7# All rights reserved. This program and the accompanying materials
8# are made available under the terms of the Eclipse Public License v1.0
9# which accompanies this distribution, and is available at
10# http://www.eclipse.org/legal/epl-v10.html
11##############################################################################
12
13HOST=$(/bin/hostname)
14SYSTEM_TYPE=''
15
16IFS=','
17for i in "basebuild,basebuild" \
18 "centos,centos" \
19 "trusty,trusty" \
20 "xenial,xenial"
21do set -- $i
22 if [[ $HOST == *"$1"* ]]; then
23 SYSTEM_TYPE="$2"
24 break
25 fi
26done
27
28# Write out the system type to an environment file to then be sourced
29echo "SYSTEM_TYPE=${SYSTEM_TYPE}" > /tmp/system_type.sh
30
31# vim: sw=4 ts=4 sts=4 et :