parent
cd5172d56f
commit
45252a1224
@ -1 +1,2 @@
|
||||
/resctl-demo-2.1.2.crate
|
||||
/resctl-demo-2.1.2-vendor.tar.gz
|
||||
|
@ -1 +1,2 @@
|
||||
SHA512 (resctl-demo-2.1.2.crate) = 76d7c962aa0611fa1dc750e856499c20b53224078a8ddfe2fe1dc6e580aca6c4147becc45216a19722f8da52959e262271509c44fe2e7582c783cc4005981246
|
||||
SHA512 (resctl-demo-2.1.2-vendor.tar.gz) = f9f4adeeb2e147744ae0121b6b41ca25b527083139142f8c71be2428dae5fd67d11600f3bd299da51ec5c68087338de80b8be01d0273df90c1aabcd798cd60b3
|
||||
|
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
name='resctl-demo'
|
||||
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