Commit 864550e1 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Added hack to generate .spec file from local crate

parent 91d7af13
#!/bin/bash
set -e
set -x
CACHE=${HOME}/.cache/rust2rpm
cargo package
mkdir -p ${CACHE}
for f in $(pwd)/target/package/*.crate ; do
echo $f
SYMLINK=${CACHE}/$(basename "$f")
if [ -L "${SYMLINK}" ] ; then
rm -f "${SYMLINK}"
fi
ln -s "$f" "${SYMLINK}"
if [[ "$(basename "$f")" =~ (.*)-(.*).crate ]] ; then
NAME=${BASH_REMATCH[1]}
VERSION=${BASH_REMATCH[2]}
rust2rpm --stdout ${NAME} ${VERSION} > rust-${NAME}-${VERSION}.spec
fi
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment