lvm2/tests/get_sources.sh
2023-07-10 13:49:43 +02:00

16 lines
335 B
Bash

#!/usr/bin/sh
set -e
PKG=$1
cat sources | \
while read SHA512_HEADER TARBALL EQUAL HASH; do
if [[ "$SHA512_HEADER" == SHA512 ]]; then
TARBALL=$(echo $TARBALL |sed 's/.\(.*\)./\1/')
curl -k -o $TARBALL https://pkgs.devel.redhat.com/repo//rpms/$PKG/$TARBALL/sha512/$HASH/$TARBALL
else
exit 1
fi
done