#!/bin/bash

        # Repositories definition only usable with redpesk OS
        
cat << EOF > /etc/yum.repos.d/redpesk-bsp-generic--redpesk-lts-batz-2.2.0-build.repo
[redpesk-bsp-generic--redpesk-lts-batz-2.2.0-build]
name=redpesk-bsp-generic--redpesk-lts-batz-2.2.0-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-bsp-generic/redpesk-lts-batz-2.2.0-release/latest/\$basearch/os?token=4fe57c07-b6e8-4d0b-8e76-ac3655229b00_9989b582-3e39-4764-b5ad-0c0a593e7791
priority=1
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/\${redpesk_gpgname},\${redpesk_download_url}/redpesk-config/\${redpesk_gpgname},file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redpesk,\${redpesk_download_url}/redpesk-config/RPM-GPG-KEY-redpesk

EOF
cat << EOF > /etc/yum.repos.d/redpesk-lts-batz-2.2.0-build.repo
[redpesk-lts-batz-2.2.0-build]
name=redpesk-lts-batz-2.2.0-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-lts-batz-2.2.0-release/latest/\$basearch/os
priority=2
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/\${redpesk_gpgname},\${redpesk_download_url}/redpesk-config/\${redpesk_gpgname},file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redpesk,\${redpesk_download_url}/redpesk-config/RPM-GPG-KEY-redpesk

EOF
cat << EOF > /etc/yum.repos.d/redpesk-config-build.repo
[redpesk-config-build]
name=redpesk-config-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-config-release/latest/\$basearch/os
priority=3
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/\${redpesk_gpgname},\${redpesk_download_url}/redpesk-config/\${redpesk_gpgname},file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redpesk,\${redpesk_download_url}/redpesk-config/RPM-GPG-KEY-redpesk

EOF