Skip to content

Commit a86ce25

Browse files
committed
buildsystem: Use printf instead of echo, use dollar shell subst instead backtick
1 parent 5ffda6b commit a86ce25

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scripts/001-binutils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ if [ "$(uname -s)" = "Darwin" ]; then
4545
TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr)"
4646
elif command -v port &> /dev/null; then
4747
## Check if using MacPorts
48-
MACPORT_BASE=$(dirname `port -q contents gmp|grep gmp.h`|sed s#/include##g)
49-
echo Macport base is $MACPORT_BASE
48+
MACPORT_BASE=$(dirname $(port -q contents gmp|grep gmp.h)|sed s#/include##g)
49+
printf 'Macport base is %s\n' "$MACPORT_BASE"
5050
TARG_XTRA_OPTS="--with-system-zlib --with-libiconv_prefix=$MACPORT_BASE --with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE --with-mpc=$MACPORT_BASE"
5151
fi
5252
fi

scripts/002-gcc-stage1.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ if [ "$(uname -s)" = "Darwin" ]; then
4646
TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr) --with-mpc=$(brew --prefix libmpc)"
4747
elif command -v port &> /dev/null; then
4848
## Check if using MacPorts
49-
MACPORT_BASE=$(dirname `port -q contents gmp|grep gmp.h`|sed s#/include##g)
50-
echo Macport base is $MACPORT_BASE
49+
MACPORT_BASE=$(dirname $(port -q contents gmp|grep gmp.h)|sed s#/include##g)
50+
printf 'Macport base is %s\n' "$MACPORT_BASE"
5151
TARG_XTRA_OPTS="--with-system-zlib --with-libiconv_prefix=$MACPORT_BASE --with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE --with-mpc=$MACPORT_BASE"
5252
fi
5353
fi

0 commit comments

Comments
 (0)