You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
949 B
35 lines
949 B
#!/bin/bash
|
|
|
|
set -Eeuo pipefail
|
|
|
|
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
|
|
|
|
find . -name '*.src.rpm' -delete
|
|
|
|
echo "Computing a list of currently maintained versions of Fedora and CentOS Stream..."
|
|
dists=( $(get_all_remote_dists) )
|
|
|
|
for dist in "${dists[@]}"; do
|
|
mkdir -p "$dist/SRPMS"
|
|
find "$dist/SRPMS" -name '*.src.rpm' -delete
|
|
rm -rf "$dist/SOURCES"
|
|
if [[ "$dist" == fedora-* ]]; then
|
|
download_sources_fedora "$dist"
|
|
elif [[ "$dist" == centos-* ]]; then
|
|
download_sources_centos_stream "$dist"
|
|
else
|
|
echo "Unknown distribution: $dist"
|
|
exit 1
|
|
fi
|
|
mapfile -t srpms < <(find "$dist/SRPMS" -name '*.src.rpm')
|
|
if [ ${#srpms[@]} -ne 3 ]; then
|
|
echo "Expecting 3 source RPMs for $dist, got only ${#srpms[@]}, skipping..."
|
|
continue
|
|
fi
|
|
echo "Found 3 source RPMs for $dist:"
|
|
for srpm in "${srpms[@]}"; do
|
|
echo " - $(basename "$srpm")"
|
|
done
|
|
install_all_srpm "$dist"
|
|
apply_patches "$dist"
|
|
done
|
|
|