aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstefson <herrtimson@yahoo.de>2020-03-04 16:22:55 +0100
committerMikhail Pukhlikov <cynede@gentoo.org>2020-03-05 10:17:19 +0400
commit5be97775f4ec8fdb8ece5956e47da5a5b4a69490 (patch)
tree11bc896797af71c97817d3c41e72b557ab4b7af5
parentcargo eclass: backport patch to use regex for name/version extraction (diff)
downloadrust-5be97775f4ec8fdb8ece5956e47da5a5b4a69490.tar.gz
rust-5be97775f4ec8fdb8ece5956e47da5a5b4a69490.tar.bz2
rust-5be97775f4ec8fdb8ece5956e47da5a5b4a69490.zip
cargo eclass: fix if then statement
Signed-off-by: Steffen Kuhn <nielson2@yandex.com> Closes: https://github.com/gentoo/gentoo-rust/pull/480 Signed-off-by: Mikhail Pukhlikov <cynede@gentoo.org>
-rw-r--r--eclass/cargo.eclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index eacad3e..5207d2a 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -39,11 +39,11 @@ cargo_crate_uris() {
readonly regex='^(.*)-([0-9]+\.[0-9]+\.[0-9]+.*)$'
local crate
for crate in "$@"; do
- if [[ "${CARGO_FETCH_CRATES}" == "not" ]]; then
local name version url
[[ $crate =~ $regex ]] || die "Could not parse name and version from crate: $crate"
name="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
+ if [[ "${CARGO_FETCH_CRATES}" == "not" ]]; then
url="https://crates.io/api/v1/crates/${name}/${version}/download -> ${crate}.crate"
else
url=""