Skip to content
Snippets Groups Projects
Commit ae91171d authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Added hack to generate .spec file from local crate

parent 91d7af13
Branches
No related tags found
No related merge requests found
#!/bin/bash
set -e
set -x
CACHE=${HOME}/.cache/rust2rpm
#cargo package --allow-dirty
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment