parent
4fbdbd183c
commit
4aa273cbf2
@ -1,2 +1,3 @@
|
||||
/linux-5.8.11.tar.xz
|
||||
/rd-agent-2.1.2.crate
|
||||
/rd-agent-2.1.2-vendor.tar.gz
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA512 (linux-5.8.11.tar.xz) = bb6994f09aabfb0076f3023dd8359c5c569a4b398d3a3c3c8d6b27052092cab56ad675f45dd6ceba7fe431f2a6a587858f3c21415b5a00adb346bd2c68d85b0f
|
||||
SHA512 (rd-agent-2.1.2.crate) = 15dae4e8d6cb2466130eeb208e387e5cc2bc1c0179dd1261057f657738c7f1dc5b54cb29d4a37074aba7196d535b91ee5058b90403c27a12115dfa1ce87712d0
|
||||
SHA512 (linux-5.8.11.tar.xz) = bb6994f09aabfb0076f3023dd8359c5c569a4b398d3a3c3c8d6b27052092cab56ad675f45dd6ceba7fe431f2a6a587858f3c21415b5a00adb346bd2c68d85b0f
|
||||
SHA512 (rd-agent-2.1.2-vendor.tar.gz) = 67bbbd761c7788c3689f1d67e720e4cafc38442b2f64e3ff384927a90ccad458b0e648224e1fa46c41550a554e17819cc7a23606d2598d1e40589fe02377ed39
|
||||
|
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
name='rd-agent'
|
||||
specfile="rust-${name}.spec"
|
||||
version=$(rpm -q --qf '%{VERSION}\n' --specfile "$specfile" | head -1)
|
||||
nv="${name}-${version}"
|
||||
crate="${nv}.crate"
|
||||
vendor_tarball="${nv}-vendor.tar.gz"
|
||||
|
||||
if [ -f "$vendor_tarball" ]; then
|
||||
echo "${vendor_tarball} already exists, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f "$crate" ] || spectool -g "$specfile"
|
||||
tardir="$PWD"
|
||||
workdir=$(mktemp -d)
|
||||
trap 'rm -rf "$workdir"' EXIT
|
||||
|
||||
tar xvzf "$tardir/$crate" -C "$workdir"
|
||||
(cd "${workdir}/${nv}" && \
|
||||
cargo vendor && \
|
||||
tar cvzf "${tardir}/${vendor_tarball}" vendor/)
|
||||
|
||||
exit 0
|
Loading…
Reference in new issue