Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
rust-hashtoc
Commits
864550e1
Commit
864550e1
authored
Apr 19, 2018
by
Anders Blomdell
Browse files
Added hack to generate .spec file from local crate
parent
91d7af13
Changes
1
Hide whitespace changes
Inline
Side-by-side
rust2rpm.sh
0 → 100755
View file @
864550e1
#!/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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment