blob: 8f05c62adcb087192c0926e769ef53300787c721 [file] [log] [blame]
#!/bin/bash -xe
#
# Purpose:
# This script is responsible for setting up a openbmc/openbmc build
# environment for a meta-* repository.
#
# Required Inputs:
# WORKSPACE: Directory which contains the extracted meta-*
# layer test is running against
# GERRIT_PROJECT: openbmc/meta-* layer under test (i.e. openbmc/meta-phosphor)
export LANG=en_US.UTF8
cd $WORKSPACE
# Grab this for the downstream job
git clone https://github.com/openbmc/openbmc-test-automation.git
export META_REPO=`basename $GERRIT_PROJECT`
# Move the extracted meta layer to a dir based on it's meta-* name
mv $GERRIT_PROJECT $META_REPO
# Clone openbmc/openbmc
git clone https://github.com/openbmc/openbmc.git
# Make sure meta-* directory is there
mkdir -p ./openbmc/$META_REPO/
# Clean out the dir to handle delete/rename of files
rm -rf ./openbmc/$META_REPO/*
# Copy the extracted meta code into it
cp -Rf $META_REPO/* ./openbmc/$META_REPO/
# Create a dummy commit so code update will pick it up
cd openbmc
git add -A && git commit -m "Dummy commit to cause code update"