#!/bin/bash

        # Repositories definition only usable with redpesk OS
        
cat << EOF > /etc/yum.repos.d/redpesk-bsp-phytec--redpesk-autosd-9-build.repo
[redpesk-bsp-phytec--redpesk-autosd-9-build]
name=redpesk-bsp-phytec--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-bsp-phytec/redpesk-autosd-9-release/latest/\$basearch/os?token=fc9d9356-30b1-45a0-8d37-8e16c0ba45e2_881c2249-bf03-45e7-acb7-1bc05f6a3c67
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-autosd-9-build.repo
[redpesk-autosd-9-build]
name=redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-autosd-9-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/apps--redpesk-autosd-9-build.repo
[apps--redpesk-autosd-9-build]
name=apps--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/apps/redpesk-autosd-9-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
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/baseos--redpesk-autosd-9-build.repo
[baseos--redpesk-autosd-9-build]
name=baseos--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/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
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-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%/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
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-third-party--redpesk-autosd-9-build.repo
[redpesk-third-party--redpesk-autosd-9-build]
name=redpesk-third-party--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-third-party/redpesk-autosd-9-release/latest/\$basearch/os?token=eb25a01f-a42f-4dfc-9904-32399e2715ab_ba5ca0fa-8d31-49cc-b66d-796a361c41ff
priority=6
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-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%/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
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-common--redpesk-autosd-9-build.repo
[redpesk-common--redpesk-autosd-9-build]
name=redpesk-common--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-common/redpesk-autosd-9-release/latest/\$basearch/os?token=9460fa02-595a-4e3e-ad07-baae287e03e1_51269e61-6f54-4d24-8627-f3d94f5d99de
priority=8
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-devtools--redpesk-autosd-9-build.repo
[redpesk-devtools--redpesk-autosd-9-build]
name=redpesk-devtools--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-devtools/redpesk-autosd-9-release/latest/\$basearch/os?token=147ff480-c3a6-4737-8e44-71d67c91996a_cdbb86a6-71ec-4418-9529-157d00426e81
priority=9
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-labs--redpesk-autosd-9-build.repo
[redpesk-labs--redpesk-autosd-9-build]
name=redpesk-labs--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-labs/redpesk-autosd-9-release/latest/\$basearch/os?token=6a20ac85-a855-4149-a492-a8747b43e976_a21e7710-749a-4a61-8fb4-423549e0a8d4
priority=13
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-samples--redpesk-autosd-9-build.repo
[redpesk-samples--redpesk-autosd-9-build]
name=redpesk-samples--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/redpesk-samples/redpesk-autosd-9-release/latest/\$basearch/os?token=b3d021d2-79cb-494e-8ebc-eeb982b1c050_57abad93-34cb-4633-9d2f-c57cdd1b5064
priority=17
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-epel9-build.repo
[import-epel9-build]
name=import-epel9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/import-epel9-release/latest/\$basearch/os
priority=50
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-autosd-9-build.repo
[import-autosd-9-build]
name=import-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/import-autosd-9-release/latest/\$basearch/os
priority=51
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
cat << EOF > /etc/yum.repos.d/rust--redpesk-autosd-9-build.repo
[rust--redpesk-autosd-9-build]
name=rust--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/rust/redpesk-autosd-9-release/latest/\$basearch/os?token=5d9d6a39-1a52-4a17-b010-463705f6527c_c0389dce-0887-4bf5-8b74-6e5bf39d677e
priority=53
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/nodejs--redpesk-autosd-9-build.repo
[nodejs--redpesk-autosd-9-build]
name=nodejs--redpesk-autosd-9-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/nodejs/redpesk-autosd-9-release/latest/\$basearch/os?token=74c896f0-73e4-438a-a145-23e83b431545_bf2f02d0-b807-48d7-bccf-8767a02f0a7d
priority=54
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-centos9s-build.repo
[import-centos9s-build]
name=import-centos9s-build
baseurl=%REDPESK_DOWNLOAD_URL%/%DIR_STAGING%/staging/import-centos9s-release/latest/\$basearch/os
priority=55
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