70880780f0
Allows specifying the path to a yum repo configuration file to be used during the image build process. The repo configuration file is removed at the end of the build. This is useful in that it allows using any arbitrary repo configuration during an image build. Change-Id: I7d5c67d74a0bb4722ffc60aacfd9fa7e80fb59d5
19 lines
641 B
Bash
Executable File
19 lines
641 B
Bash
Executable File
#!/bin/bash
|
|
# Add an additional yum repo configuration with $DIB_YUM_REPO_CONF
|
|
|
|
set -eux
|
|
set -o pipefail
|
|
|
|
# exit directly if DIB_YUM_REPO_CONF is not defined properly
|
|
if [ -z "${DIB_YUM_REPO_CONF:-}" ] ; then
|
|
echo "DIB_YUM_REPO_CONF is not set - no repo configuration will be copied in"
|
|
exit 0
|
|
elif [ ! -f "$DIB_YUM_REPO_CONF" ] ; then
|
|
echo "DIB_YUM_REPO_CONF is not a valid yum repo configuration file."
|
|
echo "You should assign a proper yum repo configuration file in DIB_YUM_REPO_CONF"
|
|
exit 1
|
|
fi
|
|
|
|
# copy the yum repo configuration
|
|
sudo cp -L -f $DIB_YUM_REPO_CONF $TMP_MOUNT_PATH/etc/yum.repos.d/dib-yum-repo-conf.repo
|