[PATCH build 4/4] Shell variable dereference clean-up.
Trevor Woerner
twoerner at gmail.com
Thu Sep 16 19:17:26 PDT 2010
From: Trevor Woerner <twoerner at gmail.com>
Remove gratuitous non-essential use of curly braces around shell variable
dereferences.
Signed-off-by: Trevor Woerner <twoerner at gmail.com>
Reviewed-by: Gaetan Nadon <memsize at videotron.ca>
---
build.sh | 42 +++++++++++++++++++++---------------------
1 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/build.sh b/build.sh
index 10f716b..67a73e6 100755
--- a/build.sh
+++ b/build.sh
@@ -34,11 +34,11 @@ setup_buildenv() {
# Must create local aclocal dir or aclocal fails
ACLOCAL_LOCALDIR="${DESTDIR}${PREFIX}/share/aclocal"
- $SUDO mkdir -p ${ACLOCAL_LOCALDIR}
+ $SUDO mkdir -p $ACLOCAL_LOCALDIR
# The following is required to make aclocal find our .m4 macros
ACLOCAL=${ACLOCAL:="aclocal"}
- export ACLOCAL="${ACLOCAL} -I ${ACLOCAL_LOCALDIR}"
+ export ACLOCAL="$ACLOCAL -I $ACLOCAL_LOCALDIR"
# The following is required to make pkg-config find our .pc metadata files
export PKG_CONFIG_PATH=${DESTDIR}${PREFIX}/share/pkgconfig:${DESTDIR}${PREFIX}/${LIBDIR}/pkgconfig${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}
@@ -66,7 +66,7 @@ nonexistent_components=""
clonefailed_components=""
failed() {
- if [ -n "${NOQUIT}" ]; then
+ if [ -n "$NOQUIT" ]; then
echo "***** $1 failed on $2/$3"
failed_components="$failed_components $2/$3"
else
@@ -236,7 +236,7 @@ build() {
mkdir -p "$DIR_ARCH" || failed mkdir $1 $2
if cd "$DIR_ARCH" ; then :; else
failed cd2 $1 $2
- cd ${old_pwd}
+ cd $old_pwd
return
fi
fi
@@ -244,39 +244,39 @@ build() {
# Special configure flags for certain modules
MOD_SPECIFIC=
- if [ "$1" = "lib" ] && [ "$2" = "libX11" ] && [ "${USE_XCB}" = "NO" ]; then
+ if [ "$1" = "lib" ] && [ "$2" = "libX11" ] && [ "$USE_XCB" = "NO" ]; then
MOD_SPECIFIC="--with-xcb=no"
fi
LIB_FLAGS=
if [ -n "$LIBDIR" ]; then
- LIB_FLAGS="--libdir=${PREFIX}/${LIBDIR}"
+ LIB_FLAGS="--libdir=$PREFIX/$LIBDIR"
fi
# Use "sh autogen.sh" since some scripts are not executable in CVS
if [ -z "$NOAUTOGEN" ]; then
- sh ${DIR_CONFIG}/${CONFCMD} --prefix=${PREFIX} ${LIB_FLAGS} \
- ${MOD_SPECIFIC} ${QUIET:+--quiet} \
- ${CACHE:+--cache-file=}${CACHE} ${CONFFLAGS} "$CONFCFLAGS" || \
- failed ${CONFCMD} $1 $2
+ sh $DIR_CONFIG/$CONFCMD --prefix=$PREFIX $LIB_FLAGS \
+ $MOD_SPECIFIC ${QUIET:+--quiet} \
+ ${CACHE:+--cache-file=}${CACHE} $CONFFLAGS "$CONFCFLAGS" || \
+ failed $CONFCMD $1 $2
fi
- ${MAKE} $MAKEFLAGS || failed make $1 $2
+ $MAKE $MAKEFLAGS || failed make $1 $2
if [ -n "$CHECK" ]; then
- ${MAKE} $MAKEFLAGS check || failed check $1 $2
+ $MAKE $MAKEFLAGS check || failed check $1 $2
fi
if [ -n "$CLEAN" ]; then
- ${MAKE} $MAKEFLAGS clean || failed clean $1 $2
+ $MAKE $MAKEFLAGS clean || failed clean $1 $2
fi
if [ -n "$DIST" ]; then
- ${MAKE} $MAKEFLAGS dist || failed dist $1 $2
+ $MAKE $MAKEFLAGS dist || failed dist $1 $2
fi
if [ -n "$DISTCHECK" ]; then
- ${MAKE} $MAKEFLAGS distcheck || failed distcheck $1 $2
+ $MAKE $MAKEFLAGS distcheck || failed distcheck $1 $2
fi
- $SUDO env LD_LIBRARY_PATH=$LD_LIBRARY_PATH ${MAKE} $MAKEFLAGS install || \
+ $SUDO env LD_LIBRARY_PATH=$LD_LIBRARY_PATH $MAKE $MAKEFLAGS install || \
failed install $1 $2
- cd ${old_pwd}
+ cd $old_pwd
if [ -n "$BUILD_ONE" ]; then
echo "Single-component build complete"
@@ -320,7 +320,7 @@ build_proto() {
build proto xf86driproto
build proto xf86vidmodeproto
build proto xineramaproto
- if [ "${USE_XCB}" != "NO" ]; then
+ if [ "$USE_XCB" != "NO" ]; then
build xcb proto
fi
}
@@ -354,7 +354,7 @@ build_lib() {
build lib libxtrans
build lib libXau
build lib libXdmcp
- if [ "${USE_XCB}" != "NO" ]; then
+ if [ "$USE_XCB" != "NO" ]; then
build xcb pthread-stubs
build xcb libxcb
build xcb util
@@ -495,7 +495,7 @@ build_app() {
build app xwd
build app xwininfo
build app xwud
-# if [ "${USE_XCB}" != "NO" ]; then
+# if [ "$USE_XCB" != "NO" ]; then
# build xcb demo
# fi
}
@@ -837,7 +837,7 @@ while [ 1 ]; do
done
PREFIX=$1
-if [ -z "${PREFIX}" ] && [ -z "$LISTONLY" ]; then
+if [ -z "$PREFIX" ] && [ -z "$LISTONLY" ]; then
usage
exit 1
fi
--
1.7.3.rc2
More information about the xorg-devel
mailing list