From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect-rust:master commit in: /
Date: Wed, 1 Jan 2020 22:25:03 +0000 (UTC) [thread overview]
Message-ID: <1577917316.b246a4aa6846c43791bff586c154877719f8830c.whissi@gentoo> (raw)
commit: b246a4aa6846c43791bff586c154877719f8830c
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 1 22:21:56 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Jan 1 22:21:56 2020 +0000
URL: https://gitweb.gentoo.org/proj/eselect-rust.git/commit/?id=b246a4aa
Fix code style
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
rust.eselect.in | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/rust.eselect.in b/rust.eselect.in
index 8e4ea3a..9de7149 100644
--- a/rust.eselect.in
+++ b/rust.eselect.in
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
DESCRIPTION="Manage the Rust compiler versions"
@@ -77,9 +77,11 @@ get_postfix() {
get_current_target() {
local i targets=( $(find_targets) )
for (( i = 0; i < ${#targets[@]}; i++ )); do
- [[ rustc-$(get_postfix ${targets[i]}) = \
- $(basename "$(canonicalise "${BIN_DIR}/rustc")") ]] \
- && echo $i && return 0
+ if [[ rustc-$(get_postfix ${targets[i]}) = \
+ $(basename "$(canonicalise "${BIN_DIR}/rustc")") ]]; then
+ echo $i
+ return 0
+ fi
done
echo "NOT_SET"
}
@@ -90,7 +92,7 @@ get_symlinks_from_file() {
local symlinks=()
local i
if [[ -e ${filename} ]]; then
- for i in `cat "${filename}"`; do
+ for i in $(cat "${filename}"); do
symlinks+=($i)
done
fi
@@ -193,8 +195,8 @@ set_version() {
done
cp "${ENV_D_PATH}/rust/provider-${target}" \
- "${ENV_D_PATH}/rust/last-set" || \
- die -q "symlink list copying failed"
+ "${ENV_D_PATH}/rust/last-set" \
+ || die -q "symlink list copying failed"
}
### cleanup action ###
@@ -250,16 +252,16 @@ describe_set() {
}
describe_set_parameters() {
- echo "<target>"
+ echo "<target>"
}
describe_set_options() {
- echo "target : Target number (from 'list' action)"
+ echo "target : Target number (from 'list' action)"
}
do_set() {
- [[ -z $1 ]] && die -q "You didn't tell me what to set the version to"
- [[ $# -gt 1 ]] && die -q "Too many parameters"
+ [[ -z $1 ]] && die -q "You didn't tell me what to set the version to"
+ [[ $# -gt 1 ]] && die -q "Too many parameters"
set_version "$1" || die -q "Couldn't set new active version"
}
next reply other threads:[~2020-01-01 22:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-01 22:25 Thomas Deutschmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-07-03 7:49 [gentoo-commits] proj/eselect-rust:master commit in: / Georgy Yakovlev
2020-04-19 1:21 Thomas Deutschmann
2020-04-19 1:21 Thomas Deutschmann
2020-04-19 1:21 Thomas Deutschmann
2020-01-01 22:25 Thomas Deutschmann
2020-01-01 22:05 Thomas Deutschmann
2019-03-11 5:02 Thomas Deutschmann
2019-03-11 5:02 Thomas Deutschmann
2019-03-11 5:02 Thomas Deutschmann
2019-03-11 5:02 Thomas Deutschmann
2019-03-11 5:02 Thomas Deutschmann
2019-03-11 5:02 Thomas Deutschmann
2019-03-11 5:02 Thomas Deutschmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1577917316.b246a4aa6846c43791bff586c154877719f8830c.whissi@gentoo \
--to=whissi@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox