From 5be97775f4ec8fdb8ece5956e47da5a5b4a69490 Mon Sep 17 00:00:00 2001 From: stefson Date: Wed, 4 Mar 2020 16:22:55 +0100 Subject: cargo eclass: fix if then statement Signed-off-by: Steffen Kuhn Closes: https://github.com/gentoo/gentoo-rust/pull/480 Signed-off-by: Mikhail Pukhlikov --- eclass/cargo.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eclass') 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="" -- cgit v1.2.3-65-gdbad