fix(rpm-ostree): Only extract repo name from the local repo when copying it

This commit is contained in:
fiftydinar 2024-07-31 18:32:37 +02:00
parent d9d7d0968e
commit 50c9c15c80

View file

@ -12,7 +12,7 @@ if [[ ${#REPOS[@]} -gt 0 ]]; then
if [[ "${REPO}" =~ ^https?:\/\/.* ]]; then
curl --output-dir "/etc/yum.repos.d/" -O "${REPO//[$'\t\r\n ']}"
elif [[ ! "${REPO}" =~ ^https?:\/\/.* ]] && [[ "${REPO}" == *".repo" ]] && [[ -f "${CONFIG_DIRECTORY}/rpm-ostree/${REPO}" ]]; then
cp "${CONFIG_DIRECTORY}/rpm-ostree/${REPO}" "/etc/yum.repos.d/${REPO}"
cp "${CONFIG_DIRECTORY}/rpm-ostree/${REPO}" "/etc/yum.repos.d/${REPO##*/}"
fi
done
fi