#!/bin/bash

        # Repositories definition only usable with redpesk OS
        
cat << EOF > /etc/yum.repos.d/redpesk-bsp-imx8--redpesk-lts-batz-2.1-update-build.repo
[redpesk-bsp-imx8--redpesk-lts-batz-2.1-update-build]
name=redpesk-bsp-imx8--redpesk-lts-batz-2.1-update-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/redpesk-bsp-imx8/redpesk-lts-batz-2.1-update-release/latest/\$basearch/os?token=1fe6f90c-757f-4043-85b0-1d53676a7451_9a6f6010-78f2-4a52-8647-8598ec5a3f80
priority=1
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF

cat << EOF > /etc/yum.repos.d/redpesk-lts-batz-2.1-update-build.repo
[redpesk-lts-batz-2.1-update-build]
name=redpesk-lts-batz-2.1-update-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/redpesk-lts-batz-2.1-update-release/latest/\$basearch/os
priority=2
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF

cat << EOF > /etc/yum.repos.d/apps--redpesk-lts-batz-2.1-update-build.repo
[apps--redpesk-lts-batz-2.1-update-build]
name=apps--redpesk-lts-batz-2.1-update-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/apps/redpesk-lts-batz-2.1-update-release/latest/\$basearch/os?token=207ba788-7236-4fd6-92f9-39713a16ee36_49cdfa33-3ab9-491b-88ba-0a47a311d83e
priority=3
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF

cat << EOF > /etc/yum.repos.d/baseos--redpesk-lts-batz-2.1-update-build.repo
[baseos--redpesk-lts-batz-2.1-update-build]
name=baseos--redpesk-lts-batz-2.1-update-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/baseos/redpesk-lts-batz-2.1-update-release/latest/\$basearch/os?token=5ac27876-b2d8-418f-8ff2-c91b7fab288a_ea5d86dd-754a-426c-9a9a-2c0770e32ea2
priority=4
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF

cat << EOF > /etc/yum.repos.d/redpesk-third-party-epel--redpesk-lts-batz-2.1-update-build.repo
[redpesk-third-party-epel--redpesk-lts-batz-2.1-update-build]
name=redpesk-third-party-epel--redpesk-lts-batz-2.1-update-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/redpesk-third-party-epel/redpesk-lts-batz-2.1-update-release/latest/\$basearch/os?token=e6afd82d-1dc0-43b8-ae5e-f08b1f0587f4_ab4a0020-4339-4e7c-8a6a-d376eb639ec9
priority=6
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF

cat << EOF > /etc/yum.repos.d/redpesk-third-party--redpesk-lts-batz-2.1-update-build.repo
[redpesk-third-party--redpesk-lts-batz-2.1-update-build]
name=redpesk-third-party--redpesk-lts-batz-2.1-update-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/redpesk-third-party/redpesk-lts-batz-2.1-update-release/latest/\$basearch/os?token=eb25a01f-a42f-4dfc-9904-32399e2715ab_ba5ca0fa-8d31-49cc-b66d-796a361c41ff
priority=7
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF

cat << EOF > /etc/yum.repos.d/import-redpesk-lts-batz-2.0-update-build.repo
[import-redpesk-lts-batz-2.0-update-build]
name=import-redpesk-lts-batz-2.0-update-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/import-redpesk-lts-batz-2.0-update-release/latest/\$basearch/os
priority=47
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF

cat << EOF > /etc/yum.repos.d/redpesk-config-build.repo
[redpesk-config-build]
name=redpesk-config-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/redpesk-config-release/latest/\$basearch/os
priority=52
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF
