From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/5] MAKEALL: use $(...) instead of `...` for readability
Date: Tue, 3 Feb 2015 19:14:46 +0900 [thread overview]
Message-ID: <1422958489-8855-4-git-send-email-yamada.m@jp.panasonic.com> (raw)
In-Reply-To: <1422958489-8855-1-git-send-email-yamada.m@jp.panasonic.com>
The mixture of single quotes and back quotes in the same line makes
scripts unreadable.
Here, do_build_target() is especially unreadable. Using $(...)
instead of `...` would make it a little better.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
MAKEALL | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/MAKEALL b/MAKEALL
index 67e6a60..dd4acb2 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -14,7 +14,7 @@ here=$(pwd)
time_start=$(date +%s)
-filename=`basename $0`
+filename=$(basename $0)
is_print_stats=1
@@ -96,14 +96,14 @@ do_build_target() {
mkdir -p "${LOGDIR}/${target}"
printf "Building ${arch} ${target} \n" >&2 | tee -a "${log_report}"
- tmp=`echo "${target}" | tr - _`
+ tmp=$(echo "${target}" | tr - _)
- cross_compile=`eval echo '$CROSS_COMPILE_'${tmp}`
- cross_compile_set=`eval echo '${CROSS_COMPILE_'${tmp}'+set}'`
+ cross_compile=$(eval echo '$CROSS_COMPILE_'${tmp})
+ cross_compile_set=$(eval echo '${CROSS_COMPILE_'${tmp}'+set}')
if [ "${cross_compile_set}" = "" ]
then
- cross_compile=`eval echo '$CROSS_COMPILE_'${arch}`
- cross_compile_set=`eval echo '${CROSS_COMPILE_'${arch}'+set}'`
+ cross_compile=$(eval echo '$CROSS_COMPILE_'${arch})
+ cross_compile_set=$(eval echo '${CROSS_COMPILE_'${arch}'+set}')
if [ "${cross_compile_set}" = "" ]
then
cross_compile=${CROSS_COMPILE}
@@ -238,7 +238,7 @@ fi
if [ "${CONFIG}" ]
then
- basedir=`dirname ${CONFIG}`
+ basedir=$(dirname ${CONFIG})
if [ ! "${basedir}" ] || [ "${basedir}" = "." ]
then
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-02-03 10:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 10:14 [PATCH 0/5] MAKEALL: fixes and refactorings Masahiro Yamada
2015-02-03 10:14 ` [PATCH 1/5] MAKEALL: check the return code of "make" rather than "printf" Masahiro Yamada
2015-02-03 10:14 ` [PATCH 2/5] MAKEALL: remove false positive error check Masahiro Yamada
2015-02-03 10:14 ` Masahiro Yamada [this message]
2015-02-03 10:14 ` [PATCH 4/5] MAKEALL: do not pass unneeded -C option to make Masahiro Yamada
2015-02-03 10:14 ` [PATCH 5/5] MAKEALL: consolidate -j${JOBS} argument Masahiro Yamada
2015-02-04 11:51 ` [PATCH 0/5] MAKEALL: fixes and refactorings Sascha Hauer
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=1422958489-8855-4-git-send-email-yamada.m@jp.panasonic.com \
--to=yamada.m@jp.panasonic.com \
--cc=barebox@lists.infradead.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