#!/bin/bash

        # Repositories definition only usable with redpesk OS
        
cat << EOF > /etc/yum.repos.d/redpesk-bsp-generic--redpesk-autosd-9-build.repo
[redpesk-bsp-generic--redpesk-autosd-9-build]
name=redpesk-bsp-generic--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/redpesk-bsp-generic/redpesk-autosd-9-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
gpgcheck=0
EOF

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

cat << EOF > /etc/yum.repos.d/baseos--redpesk-autosd-9-build.repo
[baseos--redpesk-autosd-9-build]
name=baseos--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/baseos/redpesk-autosd-9-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-toolchain--redpesk-autosd-9-build.repo
[redpesk-toolchain--redpesk-autosd-9-build]
name=redpesk-toolchain--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/redpesk-toolchain/redpesk-autosd-9-release/latest/\$basearch/os?token=bcc8220b-b2c1-4b9c-a37f-ed46e54afb6a_e74d7872-dcc4-45c4-b86f-97bce62b2d0a
priority=5
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF

cat << EOF > /etc/yum.repos.d/redpesk-core--redpesk-autosd-9-build.repo
[redpesk-core--redpesk-autosd-9-build]
name=redpesk-core--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/redpesk-core/redpesk-autosd-9-release/latest/\$basearch/os?token=367d45de-f59a-4265-829f-17f4191d0efe_558f5a56-64db-4263-99fd-11a47e4a34d4
priority=7
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF

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

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

cat << EOF > /etc/yum.repos.d/import-centos9s-build.repo
[import-centos9s-build]
name=import-centos9s-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/import-centos9s-release/latest/\$basearch/os
priority=5
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=55
module_hotfixes=1
skip_if_unavailable=True
enabled=1
gpgcheck=0
EOF
