16 lines
335 B
Bash
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
|