pungi-rocky/sync-from-upstream

35 lines
913 B
Plaintext
Raw Normal View History

2023-09-21 16:42:43 +00:00
#!/bin/bash
2024-08-20 04:58:40 +00:00
set -e
echo "Cloning upstream pungi"
git clone https://gitlab.com/redhat/centos-stream/release-engineering/pungi-centos.git -b centos-10-stream /var/tmp/c10s
2023-09-21 16:42:43 +00:00
2024-08-20 04:58:40 +00:00
echo "Copying shared data"
if [ -d "shared" ]; then
/bin/cp /var/tmp/c10s/shared/* shared/
2023-09-21 16:42:43 +00:00
fi
2024-08-20 04:58:40 +00:00
echo "Copying prepopulate"
/bin/cp /var/tmp/c10s/prepopulate.json .
echo "Changing to rocky where required in prepopulate"
while read -r pattern; do
sscript+="$pattern;"
done <<EOF
s/"redhat-release"/"rocky-release"/g
s/"redhat-release\..*"/"rocky-release.noarch"/g
s/"redhat-release-eula\..*"/"rocky-release-eula.noarch"/g
s/"redhat-indexhtml/"rocky-indexhtml/g
s/"redhat-logos/"rocky-logos/g
s/"redhat-backgrounds/"rocky-backgrounds/g
s/"redhat-sb-certs/"rocky-sb-certs/g
EOF
2024-08-20 05:00:57 +00:00
sed -i "$sscript" prepopulate.json
2024-08-20 04:58:40 +00:00
echo "Generating yaml"
/bin/bash ./generate-prepop-yaml
rm -rf /var/tmp/c10s
2023-09-21 16:42:43 +00:00
2024-08-20 04:58:40 +00:00
git status
echo "Completed. Check status above."