[PATCH 3/5] MAKEALL: use $(...) instead of `...` for readability
Masahiro Yamada
yamada.m at jp.panasonic.com
Tue Feb 3 02:14:46 PST 2015
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 at 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
More information about the barebox
mailing list