aee9cc0ce6
It's useful to be able to pass in multiple yum repo configuration files via $DIB_YUM_REPO_CONF, not just a single one. Change-Id: I43722229a2df58be55bdb2b50c253e957b18e6fe
28 lines
727 B
Bash
Executable File
28 lines
727 B
Bash
Executable File
#!/bin/bash
|
|
# Add additional yum repo configuration(s) with $DIB_YUM_REPO_CONF
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
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
|
|
fi
|
|
|
|
for file in $DIB_YUM_REPO_CONF; do
|
|
if [ ! -f $file ]; then
|
|
echo "$file is not a valid yum repo configuration file."
|
|
echo "You should assign a list of proper yum repo configuration"
|
|
echo "files in DIB_YUM_REPO_CONF."
|
|
exit 1
|
|
fi
|
|
|
|
# copy the yum repo configuration
|
|
sudo cp -L -f $file $TMP_MOUNT_PATH/etc/yum.repos.d
|
|
|
|
done
|