Skip to content

Commit

Permalink
fix: use consistent naming for additional repos
Browse files Browse the repository at this point in the history
  • Loading branch information
some-things committed Aug 21, 2024
1 parent 6809b18 commit 4e7471d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions bundles/redhat8.6/bundle.sh.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ if [[ -n "${KUBERNETES_REPOS}" ]]; then
fi

if [[ -f /etc/yum.repos.d/additional-repos.repo ]]; then
USER_REPOS="$(/usr/libexec/platform-python3.6 -c "import configparser; config = configparser.ConfigParser(); config.read('/etc/yum.repos.d/additional-repos.repo'); print(','.join(config.sections()) if config.sections() else '')")"
if [[ -n "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then
ENABLED_REPOS="${ENABLED_REPOS},${USER_REPOS}"
elif [[ -z "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then
ENABLED_REPOS="${USER_REPOS}"
ADDITIONAL_REPOS="$(/usr/libexec/platform-python3.6 -c "import configparser; config = configparser.ConfigParser(); config.read('/etc/yum.repos.d/additional-repos.repo'); print(','.join(config.sections()) if config.sections() else '')")"
if [[ -n "${ENABLED_REPOS}" ]] && [[ -n "${ADDITIONAL_REPOS}" ]]; then
ENABLED_REPOS="${ENABLED_REPOS},${ADDITIONAL_REPOS}"
elif [[ -z "${ENABLED_REPOS}" ]] && [[ -n "${ADDITIONAL_REPOS}" ]]; then
ENABLED_REPOS="${ADDITIONAL_REPOS}"
fi
fi

Expand Down
10 changes: 5 additions & 5 deletions bundles/redhat8.8/bundle.sh.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ if [[ -n "${KUBERNETES_REPOS}" ]]; then
fi

if [[ -f /etc/yum.repos.d/additional-repos.repo ]]; then
USER_REPOS="$(/usr/libexec/platform-python3.6 -c "import configparser; config = configparser.ConfigParser(); config.read('/etc/yum.repos.d/additional-repos.repo'); print(','.join(config.sections()) if config.sections() else '')")"
if [[ -n "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then
ENABLED_REPOS="${ENABLED_REPOS},${USER_REPOS}"
elif [[ -z "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then
ENABLED_REPOS="${USER_REPOS}"
ADDITIONAL_REPOS="$(/usr/libexec/platform-python3.6 -c "import configparser; config = configparser.ConfigParser(); config.read('/etc/yum.repos.d/additional-repos.repo'); print(','.join(config.sections()) if config.sections() else '')")"
if [[ -n "${ENABLED_REPOS}" ]] && [[ -n "${ADDITIONAL_REPOS}" ]]; then
ENABLED_REPOS="${ENABLED_REPOS},${ADDITIONAL_REPOS}"
elif [[ -z "${ENABLED_REPOS}" ]] && [[ -n "${ADDITIONAL_REPOS}" ]]; then
ENABLED_REPOS="${ADDITIONAL_REPOS}"
fi
fi

Expand Down

0 comments on commit 4e7471d

Please sign in to comment.