commit:     5be97775f4ec8fdb8ece5956e47da5a5b4a69490
Author:     stefson <herrtimson <AT> yahoo <DOT> de>
AuthorDate: Wed Mar  4 15:22:55 2020 +0000
Commit:     Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Thu Mar  5 06:17:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/rust.git/commit/?id=5be97775

cargo eclass: fix if then statement

Signed-off-by: Steffen Kuhn <nielson2 <AT> yandex.com>
Closes: https://github.com/gentoo/gentoo-rust/pull/480
Signed-off-by: Mikhail Pukhlikov <cynede <AT> gentoo.org>

 eclass/cargo.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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=""

Reply via email to