1#!/bin/bash -xe 2# 3# Purpose: 4# This script is responsible for setting up a openbmc/openbmc build 5# environment for a meta-* repository. 6# 7# Required Inputs: 8# WORKSPACE: Directory which contains the extracted meta-* 9# layer test is running against 10# GERRIT_PROJECT: openbmc/meta-* layer under test (i.e. openbmc/meta-phosphor) 11 12export LANG=en_US.UTF8 13cd $WORKSPACE 14 15# Grab this for the downstream job 16git clone https://github.com/openbmc/openbmc-test-automation.git 17 18export META_REPO=`basename $GERRIT_PROJECT` 19 20# Move the extracted meta layer to a dir based on it's meta-* name 21mv $GERRIT_PROJECT $META_REPO 22 23# Clone openbmc/openbmc 24git clone https://github.com/openbmc/openbmc.git 25 26# Make sure meta-* directory is there 27mkdir -p ./openbmc/$META_REPO/ 28 29# Clean out the dir to handle delete/rename of files 30rm -rf ./openbmc/$META_REPO/* 31 32# Copy the extracted meta code into it 33cp -Rf $META_REPO/* ./openbmc/$META_REPO/ 34 35# Create a dummy commit so code update will pick it up 36cd openbmc 37git add -A && git commit -m "Dummy commit to cause code update" 38