#!/bin/bash

        # Repositories definition only usable with redpesk OS
        
cat << EOF > /etc/yum.repos.d/redpesk-solidrun-hummingboard-bsp_12d603f8--redpesk-lts-corn-3.0-update-build.repo
[redpesk-solidrun-hummingboard-bsp_12d603f8--redpesk-lts-corn-3.0-update-build]
name=redpesk-solidrun-hummingboard-bsp_12d603f8--redpesk-lts-corn-3.0-update-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-solidrun-hummingboard-bsp_12d603f8/redpesk-lts-corn-3.0-update-release/latest/\$basearch/os?token=1746e6e6-0ea0-4b29-9734-c084737818e7_a3c385c8-af6b-4cb3-afce-679a18706279
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-corn-3.0-update-build.repo
[redpesk-lts-corn-3.0-update-build]
name=redpesk-lts-corn-3.0-update-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-lts-corn-3.0-update-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/import-redpesk-lts-corn-3.0-update-build.repo
[import-redpesk-lts-corn-3.0-update-build]
name=import-redpesk-lts-corn-3.0-update-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/import-redpesk-lts-corn-3.0-update-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
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=52
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