From: "Ulrich Mueller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:master commit in: libs/
Date: Sun, 13 Jan 2013 13:10:03 +0000 (UTC) [thread overview]
Message-ID: <1358081136.f24af5afeb0c6be829fc61208d85cd2c5b36a593.ulm@gentoo> (raw)
commit: f24af5afeb0c6be829fc61208d85cd2c5b36a593
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 13 12:45:36 2013 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Jan 13 12:45:36 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=f24af5af
Whitespace and quoting.
---
libs/core.bash.in | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/libs/core.bash.in b/libs/core.bash.in
index 4431a8f..90b6621 100644
--- a/libs/core.bash.in
+++ b/libs/core.bash.in
@@ -18,7 +18,7 @@
# check_do function args
# Check that function exists, and call it with args.
check_do() {
- local function="${1}"
+ local function=$1
shift
if is_function "${function}" ; then
${function} "$@"
@@ -33,27 +33,27 @@ die() {
local item funcname="" sourcefile="" lineno="" n e s="yes"
# do we have a working write_error_msg?
- if is_function "write_error_msg" ; then
+ if is_function "write_error_msg"; then
e="write_error_msg"
else
e="echo"
fi
# quiet?
- if [[ ${1} == "-q" ]] ; then
+ if [[ $1 == "-q" ]]; then
s=""
shift
fi
$e "${@:-(no message)}"
- if [[ -n "${s}" ]] ; then
- echo "Call stack:" 1>&2
- for (( n = 1 ; n < ${#FUNCNAME[@]} ; ++n )) ; do
- funcname=${FUNCNAME[${n}]}
- sourcefile=$(basename ${BASH_SOURCE[${n}]})
- lineno=${BASH_LINENO[$(( n - 1 ))]}
- echo " * ${funcname} (${sourcefile}:${lineno})" 1>&2
+ if [[ -n ${s} ]]; then
+ echo "Call stack:" >&2
+ for (( n = 1; n < ${#FUNCNAME[@]}; ++n )); do
+ funcname=${FUNCNAME[n]}
+ sourcefile=$(basename ${BASH_SOURCE[n]})
+ lineno=${BASH_LINENO[n-1]}
+ echo " * ${funcname} (${sourcefile}:${lineno})" >&2
done
fi
@@ -72,8 +72,8 @@ do_action() {
ESELECT_MODULE_NAME="${action}"
ESELECT_COMMAND="${ESELECT_PROGRAM_NAME} ${ESELECT_MODULE_NAME}"
- [[ ${ESELECT_BINARY_NAME##*/} != ${ESELECT_PROGRAM_NAME} ]] && \
- ESELECT_COMMAND="${ESELECT_BINARY_NAME##*/}"
+ [[ ${ESELECT_BINARY_NAME##*/} != "${ESELECT_PROGRAM_NAME}" ]] \
+ && ESELECT_COMMAND="${ESELECT_BINARY_NAME##*/}"
modfile=$( es_find_module "${action}" )
(
@@ -81,7 +81,7 @@ do_action() {
|| die "Couldn't source ${ESELECT_DEFAULT_ACTIONS}"
source "${modfile}" 2>/dev/null \
|| die "Couldn't source ${modfile}"
- if [[ -z ${subaction} ]] ; then
+ if [[ -z ${subaction} ]]; then
check_do "do_${DEFAULT_ACTION:-usage}" "$@"
else
is_function "do_${subaction}" \
@@ -96,7 +96,7 @@ do_action() {
inherit() {
local x
for x in "$@"; do
- [[ -e "${ESELECT_CORE_PATH}/${x}.bash" ]] \
+ [[ -e ${ESELECT_CORE_PATH}/${x}.bash ]] \
|| die "Couldn't find ${x}.bash"
source "${ESELECT_CORE_PATH}/${x}.bash" \
|| die "Couldn't source ${x}.bash"
next reply other threads:[~2013-01-13 13:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-13 13:10 Ulrich Mueller [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-06-18 19:32 [gentoo-commits] proj/eselect:master commit in: libs/ Ulrich Müller
2013-11-19 8:17 Ulrich Müller
2013-11-10 20:24 Ulrich Müller
2013-03-02 11:07 Ulrich Mueller
2013-01-05 13:47 Ulrich Mueller
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=1358081136.f24af5afeb0c6be829fc61208d85cd2c5b36a593.ulm@gentoo \
--to=ulm@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