Get rid of all `command` (which is a bashism), and replace them with $(command), which is POSIX.
Get rid of all remaining \"text\" in log messages and replace them with 'text'.
Optimise the progress bar, should go un-noticed at log level DEBUG and below.
/trunk/scripts/build/tools/200-sstrip.sh | 16 8 8 0 ++--
/trunk/scripts/build/libc_glibc.sh | 50 25 25 0 +++++++-------
/trunk/scripts/build/libc_uClibc.sh | 4 2 2 0
/trunk/scripts/build/debug/100-dmalloc.sh | 2 1 1 0
/trunk/scripts/build/debug/400-ltrace.sh | 2 1 1 0
/trunk/scripts/build/debug/300-gdb.sh | 8 4 4 0 +-
/trunk/scripts/build/debug/200-duma.sh | 6 3 3 0 +-
/trunk/scripts/build/kernel_linux.sh | 30 15 15 0 ++++----
/trunk/scripts/build/cc_gcc.sh | 14 7 7 0 ++--
/trunk/scripts/crosstool.sh | 54 27 27 0 ++++++++--------
/trunk/scripts/functions | 128 64 64 0 ++++++++++++++++++------------------
/trunk/scripts/saveSample.sh | 4 2 2 0
/trunk/scripts/tarball.sh.broken | 20 10 10 0 +++---
/trunk/tools/addToolVersion.sh | 8 4 4 0 +-
/trunk/tools/populate.in | 18 9 9 0 ++--
15 files changed, 182 insertions(+), 182 deletions(-)
1.1 --- a/scripts/build/cc_gcc.sh Mon May 19 21:41:19 2008 +0000
1.2 +++ b/scripts/build/cc_gcc.sh Tue May 20 21:32:39 2008 +0000
1.3 @@ -62,7 +62,7 @@
1.4 [ "${CT_CC_CXA_ATEXIT}" = "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
1.5 [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
1.6
1.7 - CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
1.8 + CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
1.9
1.10 # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
1.11 CC_FOR_BUILD="${CT_CC_NATIVE}" \
1.12 @@ -117,7 +117,7 @@
1.13 [ "${CT_CC_CXA_ATEXIT}" = "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
1.14 [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
1.15
1.16 - CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
1.17 + CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
1.18
1.19 CC_FOR_BUILD="${CT_CC_NATIVE}" \
1.20 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
1.21 @@ -210,7 +210,7 @@
1.22 CT_Test "Building Objective-C language is not yet supported. Will try..." "${CT_CC_LANG_OBJC}" = "y"
1.23 CT_Test "Building Objective-C++ language is not yet supported. Will try..." "${CT_CC_LANG_OBJCXX}" = "y"
1.24 CT_Test "Building ${CT_CC_LANG_OTHERS//,/ } language(s) is not yet supported. Will try..." -n "${CT_CC_LANG_OTHERS}"
1.25 - lang_opt=`echo "${lang_opt},${CT_CC_LANG_OTHERS}" |sed -r -e 's/,+/,/g; s/,*$//;'`
1.26 + lang_opt=$(echo "${lang_opt},${CT_CC_LANG_OTHERS}" |sed -r -e 's/,+/,/g; s/,*$//;')
1.27
1.28 extra_config="--enable-languages=${lang_opt}"
1.29 extra_config="${extra_config} ${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}"
1.30 @@ -223,7 +223,7 @@
1.31 fi
1.32 [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
1.33
1.34 - CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
1.35 + CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
1.36
1.37 # --enable-symvers=gnu really only needed for sh4 to work around a
1.38 # detection problem only matters for gcc-3.2.x and later, I think.
1.39 @@ -262,10 +262,10 @@
1.40 gcc-3.3.[34])
1.41 case "${CT_TARGET}" in
1.42 powerpc64-unknown-linux-gnu|x86_64-unknown-linux-gnu)
1.43 - for d in `find "${CT_SYSROOT_DIR}" -name lib -type d -empty`; do
1.44 - if [ -d `dirname "${d}"`/lib64 ] ; then
1.45 + for d in $(find "${CT_SYSROOT_DIR}" -name lib -type d -empty); do
1.46 + if [ -d $(dirname "${d}")/lib64 ] ; then
1.47 rm -rf "${d}"
1.48 - ln -s `dirname "${d}"`/lib64 "${d}"
1.49 + ln -s $(dirname "${d}")/lib64 "${d}"
1.50 fi
1.51 done ;;
1.52 *) ;;
2.1 --- a/scripts/build/debug/100-dmalloc.sh Mon May 19 21:41:19 2008 +0000
2.2 +++ b/scripts/build/debug/100-dmalloc.sh Tue May 20 21:32:39 2008 +0000
2.3 @@ -36,7 +36,7 @@
2.4 *) extra_config="${extra_config} --disable-shlib";;
2.5 esac
2.6
2.7 - CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
2.8 + CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
2.9
2.10 LD="${CT_TARGET}-ld" \
2.11 AR="${CT_TARGET}-ar" \
3.1 --- a/scripts/build/debug/200-duma.sh Mon May 19 21:41:19 2008 +0000
3.2 +++ b/scripts/build/debug/200-duma.sh Tue May 20 21:32:39 2008 +0000
3.3 @@ -13,7 +13,7 @@
3.4 # but with an underscore. Create a link so that crosstool-NG can
3.5 # work correctly:
3.6 cd "${CT_TARBALLS_DIR}"
3.7 - duma_ext=`CT_GetFileExtension "duma_${CT_DUMA_VERSION}"`
3.8 + duma_ext=$(CT_GetFileExtension "duma_${CT_DUMA_VERSION}")
3.9 rm -f "duma-${CT_DUMA_VERSION}${duma_ext}"
3.10 ln -sf "duma_${CT_DUMA_VERSION}${duma_ext}" "duma-${CT_DUMA_VERSION}${duma_ext}"
3.11 }
3.12 @@ -38,14 +38,14 @@
3.13 [ "${CT_DUMA_A}" = "y" ] && libs="${libs} libduma.a"
3.14 [ "${CT_DUMA_SO}" = "y" ] && libs="${libs} libduma.so.0.0"
3.15 for lib in ${libs}; do
3.16 - CT_DoLog EXTRA "Building library \"${lib}\""
3.17 + CT_DoLog EXTRA "Building library '${lib}'"
3.18 make HOSTCC="${CT_CC_NATIVE}" \
3.19 HOSTCXX="${CT_CC_NATIVE}" \
3.20 CC="${CT_TARGET}-${CT_CC}" \
3.21 CXX="${CT_TARGET}-${CT_CC}" \
3.22 DUMA_CPP="${DUMA_CPP}" \
3.23 ${libs} 2>&1 |CT_DoLog ALL
3.24 - CT_DoLog EXTRA "Installing library \"${lib}\""
3.25 + CT_DoLog EXTRA "Installing library '${lib}'"
3.26 install -m 644 "${lib}" "${CT_SYSROOT_DIR}/usr/lib" 2>&1 |CT_DoLog ALL
3.27 done
3.28 if [ "${CT_DUMA_SO}" = "y" ]; then
4.1 --- a/scripts/build/debug/300-gdb.sh Mon May 19 21:41:19 2008 +0000
4.2 +++ b/scripts/build/debug/300-gdb.sh Tue May 20 21:32:39 2008 +0000
4.3 @@ -4,7 +4,7 @@
4.4
4.5 do_print_filename() {
4.6 [ "${CT_GDB}" = "y" ] || return 0
4.7 - echo "gdb`do_debug_gdb_suffix`"
4.8 + echo "gdb$(do_debug_gdb_suffix)"
4.9 }
4.10
4.11 do_debug_gdb_suffix() {
4.12 @@ -15,17 +15,17 @@
4.13 }
4.14
4.15 do_debug_gdb_get() {
4.16 - CT_GetFile "gdb`do_debug_gdb_suffix`" \
4.17 + CT_GetFile "gdb$(do_debug_gdb_suffix)" \
4.18 {ftp,http}://ftp.gnu.org/pub/gnu/gdb \
4.19 ftp://sources.redhat.com/pub/gdb/{{,old-}releases,snapshots/current}
4.20 }
4.21
4.22 do_debug_gdb_extract() {
4.23 - CT_ExtractAndPatch "gdb`do_debug_gdb_suffix`"
4.24 + CT_ExtractAndPatch "gdb$(do_debug_gdb_suffix)"
4.25 }
4.26
4.27 do_debug_gdb_build() {
4.28 - gdb_src_dir="${CT_SRC_DIR}/gdb`do_debug_gdb_suffix`"
4.29 + gdb_src_dir="${CT_SRC_DIR}/gdb$(do_debug_gdb_suffix)"
4.30
4.31 extra_config=
4.32 # Version 6.3 and below behave badly with gdbmi
5.1 --- a/scripts/build/debug/400-ltrace.sh Mon May 19 21:41:19 2008 +0000
5.2 +++ b/scripts/build/debug/400-ltrace.sh Tue May 20 21:32:39 2008 +0000
5.3 @@ -11,7 +11,7 @@
5.4 CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" {ftp,http}://ftp.de.debian.org/debian/pool/main/l/ltrace/
5.5 # Create a link so that the following steps are easier to do:
5.6 cd "${CT_TARBALLS_DIR}"
5.7 - ltrace_ext=`CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig"`
5.8 + ltrace_ext=$(CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig")
5.9 ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" "ltrace-${CT_LTRACE_VERSION}${ltrace_ext}"
5.10 }
5.11
6.1 --- a/scripts/build/kernel_linux.sh Mon May 19 21:41:19 2008 +0000
6.2 +++ b/scripts/build/kernel_linux.sh Tue May 20 21:32:39 2008 +0000
6.3 @@ -44,10 +44,10 @@
6.4
6.5 mkdir -p "${CT_BUILD_DIR}/build-kernel-defconfig"
6.6 cd "${CT_BUILD_DIR}/build-kernel-defconfig"
6.7 - make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" O=`pwd` \
6.8 + make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" O=$(pwd) \
6.9 ARCH=${CT_KERNEL_ARCH} defconfig 2>&1 |CT_DoLog ALL
6.10
6.11 - CT_KERNEL_LINUX_CONFIG_FILE="`pwd`/.config"
6.12 + CT_KERNEL_LINUX_CONFIG_FILE="$(pwd)/.config"
6.13
6.14 CT_EndStep
6.15 fi
6.16 @@ -64,20 +64,20 @@
6.17 # We need to enter this directory to find the kernel version strings
6.18 cd "${CT_SRC_DIR}/${CT_KERNEL_FILE}"
6.19 if [ "${CT_KERNEL_LINUX_HEADERS_SANITISED}" != "y" ]; then
6.20 - k_version=`awk '/^VERSION =/ { print $3 }' Makefile`
6.21 - k_patchlevel=`awk '/^PATCHLEVEL =/ { print $3 }' Makefile`
6.22 - k_sublevel=`awk '/^SUBLEVEL =/ { print $3 }' Makefile`
6.23 - k_extraversion=`awk '/^EXTRAVERSION =/ { print $3 }' Makefile`
6.24 + k_version=$(awk '/^VERSION =/ { print $3 }' Makefile)
6.25 + k_patchlevel=$(awk '/^PATCHLEVEL =/ { print $3 }' Makefile)
6.26 + k_sublevel=$(awk '/^SUBLEVEL =/ { print $3 }' Makefile)
6.27 + k_extraversion=$(awk '/^EXTRAVERSION =/ { print $3 }' Makefile)
6.28 else
6.29 - k_version=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 1`
6.30 - k_patchlevel=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 2`
6.31 - k_sublevel=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 3`
6.32 - k_extraversion=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 4`
6.33 + k_version=$(echo "${CT_KERNEL_VERSION}." |cut -d . -f 1)
6.34 + k_patchlevel=$(echo "${CT_KERNEL_VERSION}." |cut -d . -f 2)
6.35 + k_sublevel=$(echo "${CT_KERNEL_VERSION}." |cut -d . -f 3)
6.36 + k_extraversion=$(echo "${CT_KERNEL_VERSION}." |cut -d . -f 4)
6.37 fi
6.38
6.39 case "${k_version}.${k_patchlevel}" in
6.40 2.2|2.4|2.6) ;;
6.41 - *) CT_Abort "Unsupported kernel version \"linux-${k_version}.${k_patchlevel}\".";;
6.42 + *) CT_Abort "Unsupported kernel version 'linux-${k_version}.${k_patchlevel}'.";;
6.43 esac
6.44
6.45 # Kernel version that support verbosity will use this, others will ignore it:
6.46 @@ -109,7 +109,7 @@
6.47
6.48 CT_DoLog EXTRA "Installing kernel headers"
6.49 make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" \
6.50 - O="`pwd`" \
6.51 + O=$(pwd) \
6.52 ARCH=${CT_KERNEL_ARCH} \
6.53 INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
6.54 ${V_OPT} \
6.55 @@ -118,7 +118,7 @@
6.56 if [ "${CT_KERNEL_LINUX_HEADERS_INSTALL_CHECK}" = "y" ]; then
6.57 CT_DoLog EXTRA "Checking installed headers"
6.58 make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" \
6.59 - O="`pwd`" \
6.60 + O=$(pwd) \
6.61 ARCH=${CT_KERNEL_ARCH} \
6.62 INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
6.63 ${V_OPT} \
6.64 @@ -154,7 +154,7 @@
6.65 cd "${CT_BUILD_DIR}/build-kernel-headers"
6.66 cp "${CT_KERNEL_LINUX_CONFIG_FILE}" .config
6.67 CT_DoYes "" |make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" \
6.68 - O="`pwd`" ${V_OPT} ARCH=${CT_KERNEL_ARCH} \
6.69 + O=$(pwd) ${V_OPT} ARCH=${CT_KERNEL_ARCH} \
6.70 oldconfig
6.71 case "${CT_KERNEL_ARCH}" in
6.72 sh*) # sh does secret stuff in 'make prepare' that can't be
6.73 @@ -166,7 +166,7 @@
6.74 ARCH=${CT_KERNEL_ARCH} ${V_OPT} \
6.75 prepare include/linux/version.h
6.76 ;;
6.77 - arm*|cris*) make ${PARALLELMFLAGS} \
6.78 + arm*|cris*) make ${PARALLELMFLAGS} \
6.79 ARCH=${CT_KERNEL_ARCH} ${V_OPT} \
6.80 include/asm include/linux/version.h \
6.81 include/asm-${CT_KERNEL_ARCH}/.arch
7.1 --- a/scripts/build/libc_glibc.sh Mon May 19 21:41:19 2008 +0000
7.2 +++ b/scripts/build/libc_glibc.sh Tue May 20 21:32:39 2008 +0000
7.3 @@ -5,7 +5,7 @@
7.4 do_print_filename() {
7.5 [ "${CT_LIBC}" = "glibc" ] || return 0
7.6 echo "glibc-${CT_LIBC_VERSION}"
7.7 - for addon in `do_libc_add_ons_list " "`; do
7.8 + for addon in $(do_libc_add_ons_list " "); do
7.9 # NPTL addon is not to be downloaded, in any case
7.10 [ "${addon}" = "nptl" ] && continue || true
7.11 echo "glibc-${addon}-${CT_LIBC_VERSION}"
7.12 @@ -20,7 +20,7 @@
7.13 CT_GetFile "${CT_LIBC_FILE}" {ftp,http}://ftp.gnu.org/gnu/glibc
7.14
7.15 # C library addons
7.16 - for addon in `do_libc_add_ons_list " "`; do
7.17 + for addon in $(do_libc_add_ons_list " "); do
7.18 # NPTL addon is not to be downloaded, in any case
7.19 [ "${addon}" = "nptl" ] && continue || true
7.20 CT_GetFile "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" {ftp,http}://ftp.gnu.org/gnu/glibc
7.21 @@ -34,7 +34,7 @@
7.22 CT_ExtractAndPatch "${CT_LIBC_FILE}"
7.23
7.24 # C library addons
7.25 - for addon in `do_libc_add_ons_list " "`; do
7.26 + for addon in $(do_libc_add_ons_list " "); do
7.27 # NPTL addon is not to be extracted, in any case
7.28 [ "${addon}" = "nptl" ] && continue || true
7.29 CT_ExtractAndPatch "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
7.30 @@ -77,15 +77,15 @@
7.31 # Override libc_cv_ppc_machine so glibc-cvs doesn't complain
7.32 # 'a version of binutils that supports .machine "altivec" is needed'.
7.33
7.34 - addons_config="--enable-add-ons=`do_libc_add_ons_list ,`"
7.35 + addons_config="--enable-add-ons=$(do_libc_add_ons_list ,)"
7.36 # We need to remove any threading addon when installing headers
7.37 addons_config="${addons_config//nptl/}"
7.38 addons_config="${addons_config//linuxthreads/}"
7.39 - addons_config=`echo "${addons_config}" |sed -r -e 's/^,+//; s/,+$//; s/,+/,/g;'`
7.40 + addons_config=$(echo "${addons_config}" |sed -r -e 's/^,+//; s/,+$//; s/,+/,/g;')
7.41
7.42 - cross_cc=`CT_Which "${CT_TARGET}-gcc"`
7.43 - CT_DoLog DEBUG "Using gcc for target: \"${cross_cc}\""
7.44 - CT_DoLog DEBUG "Extra config passed : \"${addons_config}\""
7.45 + cross_cc=$(CT_Which "${CT_TARGET}-gcc")
7.46 + CT_DoLog DEBUG "Using gcc for target: '${cross_cc}'"
7.47 + CT_DoLog DEBUG "Extra config passed : '${addons_config}'"
7.48
7.49 libc_cv_ppc_machine=yes \
7.50 CC=${cross_cc} \
7.51 @@ -196,7 +196,7 @@
7.52 extra_config=""
7.53 case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in
7.54 *enable-kernel*) ;;
7.55 - *) extra_config="${extra_config} --enable-kernel=`echo ${CT_KERNEL_VERSION} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;'`"
7.56 + *) extra_config="${extra_config} --enable-kernel=$(echo ${CT_KERNEL_VERSION} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;')"
7.57 esac
7.58 case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in
7.59 *-tls*) ;;
7.60 @@ -213,7 +213,7 @@
7.61 # Obviously, we want threads, as we come here only for NPTL
7.62 extra_config="${extra_config} --with-__thread"
7.63
7.64 - addons_config="--enable-add-ons=`do_libc_add_ons_list ,`"
7.65 + addons_config="--enable-add-ons=$(do_libc_add_ons_list ,)"
7.66 extra_config="${extra_config} ${addons_config}"
7.67
7.68 # Add some default CC args
7.69 @@ -229,11 +229,11 @@
7.70 fi
7.71 extra_cc_args="${extra_cc_args} ${CT_ARCH_ENDIAN_OPT}"
7.72
7.73 - cross_cc=`CT_Which "${CT_TARGET}-gcc"`
7.74 - CT_DoLog DEBUG "Using gcc for target : \"${cross_cc}\""
7.75 - CT_DoLog DEBUG "Configuring with addons : \"`do_libc_add_ons_list ,`\""
7.76 - CT_DoLog DEBUG "Extra config args passed: \"${extra_config}\""
7.77 - CT_DoLog DEBUG "Extra CC args passed : \"${extra_cc_args}\""
7.78 + cross_cc=$(CT_Which "${CT_TARGET}-gcc")
7.79 + CT_DoLog DEBUG "Using gcc for target : '${cross_cc}'"
7.80 + CT_DoLog DEBUG "Configuring with addons : '$(do_libc_add_ons_list ,)'"
7.81 + CT_DoLog DEBUG "Extra config args passed: '${extra_config}'"
7.82 + CT_DoLog DEBUG "Extra CC args passed : '${extra_cc_args}'"
7.83
7.84 # Super-H really needs to set configparms as of gcc-3.4/glibc-2.3.2
7.85 # note: this is awkward, doesn't work well if you need more than one
7.86 @@ -292,7 +292,7 @@
7.87 # We don't need to be conditional on wether the user did set different
7.88 # values, as they CT_LIBC_GLIBC_EXTRA_CONFIG is passed after extra_config
7.89
7.90 - extra_config="--enable-kernel=`echo ${CT_KERNEL_VERSION} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;'`"
7.91 + extra_config="--enable-kernel=$(echo ${CT_KERNEL_VERSION} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;')"
7.92
7.93 case "${CT_THREADS}" in
7.94 nptl) extra_config="${extra_config} --with-__thread --with-tls";;
7.95 @@ -315,9 +315,9 @@
7.96 ,y) extra_config="${extra_config} --without-fp";;
7.97 esac
7.98
7.99 - case "`do_libc_add_ons_list ,`" in
7.100 + case "$(do_libc_add_ons_list ,)" in
7.101 "") ;;
7.102 - *) extra_config="${extra_config} --enable-add-ons=`do_libc_add_ons_list ,`";;
7.103 + *) extra_config="${extra_config} --enable-add-ons=$(do_libc_add_ons_list ,)";;
7.104 esac
7.105
7.106
7.107 @@ -334,11 +334,11 @@
7.108 fi
7.109 extra_cc_args="${extra_cc_args} ${CT_ARCH_ENDIAN_OPT}"
7.110
7.111 - cross_cc=`CT_Which "${CT_TARGET}-gcc"`
7.112 - CT_DoLog DEBUG "Using gcc for target : \"${cross_cc}\""
7.113 - CT_DoLog DEBUG "Configuring with addons : \"`do_libc_add_ons_list ,`\""
7.114 - CT_DoLog DEBUG "Extra config args passed: \"${extra_config}\""
7.115 - CT_DoLog DEBUG "Extra CC args passed : \"${extra_cc_args}\""
7.116 + cross_cc=$(CT_Which "${CT_TARGET}-gcc")
7.117 + CT_DoLog DEBUG "Using gcc for target : '${cross_cc}'"
7.118 + CT_DoLog DEBUG "Configuring with addons : '$(do_libc_add_ons_list ,)'"
7.119 + CT_DoLog DEBUG "Extra config args passed: '${extra_config}'"
7.120 + CT_DoLog DEBUG "Extra CC args passed : '${extra_cc_args}'"
7.121
7.122 # sh3 and sh4 really need to set configparms as of gcc-3.4/glibc-2.3.2
7.123 # note: this is awkward, doesn't work well if you need more than one line in configparms
7.124 @@ -446,7 +446,7 @@
7.125 for dir in lib lib64 usr/lib usr/lib64; do
7.126 if [ -f "${CT_SYSROOT_DIR}/${dir}/${file}" -a ! -L ${CT_SYSROOT_DIR}/$lib/$file ]; then
7.127 cp "${CT_SYSROOT_DIR}/${dir}/${file}" "${CT_SYSROOT_DIR}/${dir}/${file}_orig"
7.128 - CT_DoLog DEBUG "Fixing \"${CT_SYS_ROOT_DIR}/${dir}/${file}\""
7.129 + CT_DoLog DEBUG "Fixing '${CT_SYS_ROOT_DIR}/${dir}/${file}'"
7.130 sed -i -r -e 's,/usr/lib/,,g;
7.131 s,/usr/lib64/,,g;
7.132 s,/lib/,,g;
7.133 @@ -488,7 +488,7 @@
7.134 # Build up the addons list, separated with $1
7.135 do_libc_add_ons_list() {
7.136 local sep="$1"
7.137 - local addons_list=`echo "${CT_LIBC_ADDONS_LIST//,/${sep}}" |tr -s ,`
7.138 + local addons_list=$(echo "${CT_LIBC_ADDONS_LIST//,/${sep}}" |tr -s ,)
7.139 case "${CT_THREADS}" in
7.140 none) ;;
7.141 *) addons_list="${addons_list}${sep}${CT_THREADS}";;
8.1 --- a/scripts/build/libc_uClibc.sh Mon May 19 21:41:19 2008 +0000
8.2 +++ b/scripts/build/libc_uClibc.sh Tue May 20 21:32:39 2008 +0000
8.3 @@ -218,8 +218,8 @@
8.4 # From http://www.uclibc.org/cgi-bin/viewcvs.cgi?rev=16846&view=rev
8.5 # " we just want the kernel headers, not the whole kernel source ...
8.6 # " so people may need to update their paths slightly
8.7 - quoted_kernel_source=`echo "${CT_HEADERS_DIR}" | sed -r -e 's,/include/?$,,; s,/,\\\\/,g;'`
8.8 - quoted_headers_dir=`echo ${CT_HEADERS_DIR} | sed -r -e 's,/,\\\\/,g;'`
8.9 + quoted_kernel_source=$(echo "${CT_HEADERS_DIR}" | sed -r -e 's,/include/?$,,; s,/,\\/,g;')
8.10 + quoted_headers_dir=$(echo "${CT_HEADERS_DIR}" | sed -r -e 's,/,\\/,g;')
8.11 # CROSS_COMPILER_PREFIX is left as is, as the CROSS parameter is forced on the command line
8.12 # DEVEL_PREFIX is left as '/usr/' because it is post-pended to $PREFIX, wich is the correct value of ${PREFIX}/${TARGET}
8.13 # Some (old) versions of uClibc use KERNEL_SOURCE (which is _wrong_), and
9.1 --- a/scripts/build/tools/200-sstrip.sh Mon May 19 21:41:19 2008 +0000
9.2 +++ b/scripts/build/tools/200-sstrip.sh Tue May 20 21:32:39 2008 +0000
9.3 @@ -42,24 +42,24 @@
9.4 return 0
9.5 fi
9.6 if [ -f "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" ]; then
9.7 - CT_DoLog EXTRA "Using \"sstrip\" from local storage"
9.8 + CT_DoLog EXTRA "Using 'sstrip' from local storage"
9.9 ln -sf "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" \
9.10 "${CT_TARBALLS_DIR}/sstrip.c" 2>&1 |CT_DoLog ALL
9.11 return 0
9.12 fi
9.13 CT_Pushd "${CT_TARBALLS_DIR}"
9.14 - CT_DoLog EXTRA "Retrieving \"sstrip\" from network"
9.15 - http_data=`lynx -dump "${sstrip_url}"`
9.16 - link=`echo -en "${http_data}" \
9.17 + CT_DoLog EXTRA "Retrieving 'sstrip' from network"
9.18 + http_data=$(lynx -dump "${sstrip_url}")
9.19 + link=$(echo -en "${http_data}" \
9.20 |egrep '\[[[:digit:]]+\]download' \
9.21 - |sed -r -e 's/.*\[([[:digit:]]+)\]download.*/\1/;'`
9.22 - rev_url=`echo -en "${http_data}" \
9.23 + |sed -r -e 's/.*\[([[:digit:]]+)\]download.*/\1/;')
9.24 + rev_url=$(echo -en "${http_data}" \
9.25 |egrep '^ *8\.' \
9.26 - |sed -r -e 's/^ *'${link}'\. +(.+)$/\1/;'`
9.27 + |sed -r -e 's/^ *'${link}'\. +(.+)$/\1/;')
9.28 CT_DoGetFile "${rev_url}" 2>&1 |CT_DoLog ALL
9.29 mv -v sstrip.c?* sstrip.c 2>&1 |CT_DoLog DEBUG
9.30 if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
9.31 - CT_DoLog EXTRA "Saving \"sstrip.c\" to local storage"
9.32 + CT_DoLog EXTRA "Saving 'sstrip.c' to local storage"
9.33 cp -v sstrip.c "${CT_LOCAL_TARBALLS_DIR}" 2>&1 |CT_DoLog DEBUG
9.34 fi
9.35 CT_Popd
10.1 --- a/scripts/crosstool.sh Mon May 19 21:41:19 2008 +0000
10.2 +++ b/scripts/crosstool.sh Tue May 20 21:32:39 2008 +0000
10.3 @@ -20,8 +20,8 @@
10.4 # - initialise logging.
10.5 . "${CT_LIB_DIR}/scripts/functions"
10.6
10.7 -CT_STAR_DATE=`CT_DoDate +%s%N`
10.8 -CT_STAR_DATE_HUMAN=`CT_DoDate +%Y%m%d.%H%M%S`
10.9 +CT_STAR_DATE=$(CT_DoDate +%s%N)
10.10 +CT_STAR_DATE_HUMAN=$(CT_DoDate +%Y%m%d.%H%M%S)
10.11
10.12 # Are we configured? We'll need that later...
10.13 CT_TestOrAbort "Configuration file not found. Please create one." -f "${CT_TOP_DIR}/.config"
10.14 @@ -104,12 +104,12 @@
10.15 fi
10.16
10.17 # Make all path absolute, it so much easier!
10.18 -CT_LOCAL_TARBALLS_DIR="`CT_MakeAbsolutePath \"${CT_LOCAL_TARBALLS_DIR}\"`"
10.19 +CT_LOCAL_TARBALLS_DIR=$(CT_MakeAbsolutePath "${CT_LOCAL_TARBALLS_DIR}")
10.20
10.21 # If the local tarball directory does not exist, say so, and don't try to save there!
10.22 if [ ! -d "${CT_LOCAL_TARBALLS_DIR}" ]; then
10.23 - CT_DoLog WARN "Directory \"${CT_LOCAL_TARBALLS_DIR}\" does not exist. Will not save downloaded tarballs to local storage."
10.24 - CT_SAVE_TARBALLS=""
10.25 + CT_DoLog WARN "Directory '${CT_LOCAL_TARBALLS_DIR}' does not exist. Will not save downloaded tarballs to local storage."
10.26 + CT_SAVE_TARBALLS=
10.27 fi
10.28
10.29 # Some more sanity checks now that we have all paths set up
10.30 @@ -119,23 +119,23 @@
10.31
10.32 # Check now if we can write to the destination directory:
10.33 if [ -d "${CT_INSTALL_DIR}" ]; then
10.34 - CT_TestAndAbort "Destination directory \"${CT_INSTALL_DIR}\" is not removable" ! -w `dirname "${CT_INSTALL_DIR}"`
10.35 + CT_TestAndAbort "Destination directory '${CT_INSTALL_DIR}' is not removable" ! -w $(dirname "${CT_INSTALL_DIR}")
10.36 fi
10.37
10.38 # Good, now grab a bit of informations on the system we're being run on,
10.39 # just in case something goes awok, and it's not our fault:
10.40 -CT_SYS_USER="`id -un`"
10.41 -CT_SYS_HOSTNAME=`hostname -f 2>/dev/null || true`
10.42 +CT_SYS_USER=$(id -un)
10.43 +CT_SYS_HOSTNAME=$(hostname -f 2>/dev/null || true)
10.44 # Hmmm. Some non-DHCP-enabled machines do not have an FQDN... Fall back to node name.
10.45 -CT_SYS_HOSTNAME="${CT_SYS_HOSTNAME:-`uname -n`}"
10.46 -CT_SYS_KERNEL=`uname -s`
10.47 -CT_SYS_REVISION=`uname -r`
10.48 +CT_SYS_HOSTNAME="${CT_SYS_HOSTNAME:-$(uname -n)}"
10.49 +CT_SYS_KERNEL=$(uname -s)
10.50 +CT_SYS_REVISION=$(uname -r)
10.51 # MacOS X lacks '-o' :
10.52 -CT_SYS_OS=`uname -o || echo "Unknown (maybe MacOS-X)"`
10.53 -CT_SYS_MACHINE=`uname -m`
10.54 -CT_SYS_PROCESSOR=`uname -p`
10.55 -CT_SYS_GCC=`gcc -dumpversion`
10.56 -CT_SYS_TARGET=`CT_DoConfigGuess`
10.57 +CT_SYS_OS=$(uname -o || echo "Unknown (maybe MacOS-X)")
10.58 +CT_SYS_MACHINE=$(uname -m)
10.59 +CT_SYS_PROCESSOR=$(uname -p)
10.60 +CT_SYS_GCC=$(gcc -dumpversion)
10.61 +CT_SYS_TARGET=$(CT_DoConfigGuess)
10.62 CT_TOOLCHAIN_ID="crosstool-${CT_VERSION} build ${CT_STAR_DATE_HUMAN} by ${CT_SYS_USER}@${CT_SYS_HOSTNAME}"
10.63
10.64 CT_DoLog EXTRA "Preparing working directories"
10.65 @@ -315,8 +315,8 @@
10.66 if [ -z "${CT_RESTART}" ]; then
10.67 # Determine build system if not set by the user
10.68 CT_Test "You did not specify the build system. That's OK, I can guess..." -z "${CT_BUILD}"
10.69 - CT_BUILD="${CT_BUILD:-`CT_DoConfigGuess`}"
10.70 - CT_BUILD=`CT_DoConfigSub "${CT_BUILD}"`
10.71 + CT_BUILD="${CT_BUILD:-$(CT_DoConfigGuess)}"
10.72 + CT_BUILD=$(CT_DoConfigSub "${CT_BUILD}")
10.73
10.74 # Arrange paths depending on wether we use sys-root or not.
10.75 if [ "${CT_USE_SYSROOT}" = "y" ]; then
10.76 @@ -352,7 +352,7 @@
10.77 mkdir -p "${CT_SYSROOT_DIR}/usr/lib"
10.78
10.79 # Canadian-cross are really picky on the way they are built. Tweak the values.
10.80 - CT_UNIQ_BUILD=`echo "${CT_BUILD}" |sed -r -e 's/-/-build_/'`
10.81 + CT_UNIQ_BUILD=$(echo "${CT_BUILD}" |sed -r -e 's/-/-build_/')
10.82 if [ "${CT_CANADIAN}" = "y" ]; then
10.83 # Arrange so that gcc never, ever think that build system == host system
10.84 CT_CANADIAN_OPT="--build=${CT_UNIQ_BUILD}"
10.85 @@ -383,7 +383,7 @@
10.86 # (Copied almost as-is from original crosstool):
10.87 case "${CT_KERNEL},${CT_CANADIAN}" in
10.88 cygwin,y) ;;
10.89 - *,y) CT_HOST="`echo \"${CT_HOST}\" |sed -r -e 's/-/-host_/;'`";;
10.90 + *,y) CT_HOST=$(echo "${CT_HOST}" |sed -r -e 's/-/-host_/;');;
10.91 esac
10.92
10.93 # Ah! Recent versions of binutils need some of the build and/or host system
10.94 @@ -392,7 +392,7 @@
10.95 CT_DoLog DEBUG "Making build system tools available"
10.96 mkdir -p "${CT_PREFIX_DIR}/bin"
10.97 for tool in ar as dlltool ${CT_CC_NATIVE:=gcc} gnatbind gnatmake ld nm ranlib strip windres objcopy objdump; do
10.98 - tmp=`CT_Which ${tool}`
10.99 + tmp=$(CT_Which ${tool})
10.100 if [ -n "${tmp}" ]; then
10.101 ln -sfv "${tmp}" "${CT_PREFIX_DIR}/bin/${CT_BUILD}-${tool}"
10.102 ln -sfv "${tmp}" "${CT_PREFIX_DIR}/bin/${CT_UNIQ_BUILD}-${tool}"
10.103 @@ -480,7 +480,7 @@
10.104 else
10.105 CT_DoSaveState ${step}
10.106 if [ ${do_stop} -eq 1 ]; then
10.107 - CT_DoLog ERROR "Stopping just after step \"${prev_step}\", as requested."
10.108 + CT_DoLog ERROR "Stopping just after step '${prev_step}', as requested."
10.109 exit 0
10.110 fi
10.111 fi
10.112 @@ -490,7 +490,7 @@
10.113 do_stop=1
10.114 fi
10.115 if [ "${CTDEBUG_CT_PAUSE_STEPS}" = "y" ]; then
10.116 - CT_DoPause "Step \"${step}\" finished"
10.117 + CT_DoPause "Step '${step}' finished"
10.118 fi
10.119 fi
10.120 prev_step="${step}"
10.121 @@ -513,13 +513,13 @@
10.122 CT_Pushd "${CT_PREFIX_DIR}/bin"
10.123 for t in "${CT_TARGET}-"*; do
10.124 if [ -n "${CT_TARGET_ALIAS}" ]; then
10.125 - _t="`echo \"$t\" |sed -r -e 's/^'\"${CT_TARGET}\"'-/'\"${CT_TARGET_ALIAS}\"'-/;'`"
10.126 - CT_DoLog DEBUG "Linking \"${_t}\" -> \"${t}\""
10.127 + _t=$(echo "$t" |sed -r -e 's/^'"${CT_TARGET}"'-/'"${CT_TARGET_ALIAS}"'-/;')
10.128 + CT_DoLog DEBUG "Linking '${_t}' -> '${t}'"
10.129 ln -sv "${t}" "${_t}" 2>&1 |CT_DoLog ALL
10.130 fi
10.131 if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
10.132 - _t="`echo \"$t\" |sed -r -e \"${CT_TARGET_ALIAS_SED_EXPR}\"`"
10.133 - CT_DoLog DEBUG "Linking \"${_t}\" -> \"${t}\""
10.134 + _t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
10.135 + CT_DoLog DEBUG "Linking '${_t}' -> '${t}'"
10.136 ln -sv "${t}" "${_t}" 2>&1 |CT_DoLog ALL
10.137 fi
10.138 done
11.1 --- a/scripts/functions Mon May 19 21:41:19 2008 +0000
11.2 +++ b/scripts/functions Tue May 20 21:32:39 2008 +0000
11.3 @@ -5,15 +5,15 @@
11.4 # Prepare the fault handler
11.5 CT_OnError() {
11.6 ret=$?
11.7 - CT_DoLog ERROR "Build failed in step \"${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}\""
11.8 + CT_DoLog ERROR "Build failed in step '${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}'"
11.9 for((step=(CT_STEP_COUNT-1); step>1; step--)); do
11.10 - CT_DoLog ERROR " called in step \"${CT_STEP_MESSAGE[${step}]}\""
11.11 + CT_DoLog ERROR " called in step '${CT_STEP_MESSAGE[${step}]}'"
11.12 done
11.13 - CT_DoLog ERROR "Error happened in \"${BASH_SOURCE[1]}\" in function \"${FUNCNAME[1]}\" (line unknown, sorry)"
11.14 + CT_DoLog ERROR "Error happened in '${BASH_SOURCE[1]}' in function '${FUNCNAME[1]}' (line unknown, sorry)"
11.15 for((depth=2; ${BASH_LINENO[$((${depth}-1))]}>0; depth++)); do
11.16 - CT_DoLog ERROR " called from \"${BASH_SOURCE[${depth}]}\" at line # ${BASH_LINENO[${depth}-1]} in function \"${FUNCNAME[${depth}]}\""
11.17 + CT_DoLog ERROR " called from '${BASH_SOURCE[${depth}]}' at line # ${BASH_LINENO[${depth}-1]} in function '${FUNCNAME[${depth}]}'"
11.18 done
11.19 - [ "${CT_LOG_TO_FILE}" = "y" ] && CT_DoLog ERROR "Look at \"${CT_LOG_FILE}\" for more info on this error."
11.20 + [ "${CT_LOG_TO_FILE}" = "y" ] && CT_DoLog ERROR "Look at '${CT_LOG_FILE}' for more info on this error."
11.21 CT_STEP_COUNT=1
11.22 CT_DoEnd ERROR
11.23 exit $ret
11.24 @@ -75,7 +75,11 @@
11.25 else
11.26 echo "${1}"
11.27 fi |( IFS="\n" # We want the full lines, even leading spaces
11.28 - CT_PROG_BAR_CPT=0
11.29 + _prog_bar_cpt=0
11.30 + _prog_bar[0]='/'
11.31 + _prog_bar[1]='-'
11.32 + _prog_bar[2]='\'
11.33 + _prog_bar[3]='|'
11.34 indent=$((2*CT_STEP_COUNT))
11.35 while read line; do
11.36 case "${CT_LOG_SEE_TOOLS_WARN},${line}" in
11.37 @@ -85,19 +89,15 @@
11.38 *"make["?*"]:"*"Stop.") cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};;
11.39 *) cur_L="${LEVEL}"; cur_l="${level}";;
11.40 esac
11.41 - l="`printf \"[%-5s]%*s%s%s\" \"${cur_L}\" \"${indent}\" \" \" \"${line}\"`"
11.42 - # There will always be a log file, be it /dev/null
11.43 - echo -e "${l}"
11.44 + # There will always be a log file (stdout, fd #1), be it /dev/null
11.45 + printf "[%-5s]%*s%s%s\n" "${cur_L}" "${indent}" " " "${line}"
11.46 if [ ${cur_l} -le ${max_level} ]; then
11.47 - echo -e "\r${l}" >&6
11.48 + # Only print to console (fd #6) if log level is high enough.
11.49 + printf "\r[%-5s]%*s%s%s\n" "${cur_L}" "${indent}" " " "${line}" >&6
11.50 fi
11.51 if [ "${CT_LOG_PROGRESS_BAR}" = "y" ]; then
11.52 - [ ${CT_PROG_BAR_CPT} -eq 0 ] && bar="/"
11.53 - [ ${CT_PROG_BAR_CPT} -eq 10 ] && bar="-"
11.54 - [ ${CT_PROG_BAR_CPT} -eq 20 ] && bar="\\"
11.55 - [ ${CT_PROG_BAR_CPT} -eq 30 ] && bar="|"
11.56 - printf "\r[%02d:%02d] %s " $((SECONDS/60)) $((SECONDS%60)) "${bar}" >&6
11.57 - CT_PROG_BAR_CPT=$(((CT_PROG_BAR_CPT+1)%40))
11.58 + printf "\r[%02d:%02d] %s " $((SECONDS/60)) $((SECONDS%60)) "${_prog_bar[$((_prog_bar_cpt/10))]}" >&6
11.59 + _prog_bar_cpt=$(((_prog_bar_cpt+1)%40))
11.60 fi
11.61 done
11.62 )
11.63 @@ -110,13 +110,13 @@
11.64 CT_DoEnd()
11.65 {
11.66 local level="$1"
11.67 - CT_STOP_DATE=`CT_DoDate +%s%N`
11.68 - CT_STOP_DATE_HUMAN=`CT_DoDate +%Y%m%d.%H%M%S`
11.69 + CT_STOP_DATE=$(CT_DoDate +%s%N)
11.70 + CT_STOP_DATE_HUMAN=$(CT_DoDate +%Y%m%d.%H%M%S)
11.71 CT_DoLog "${level:-INFO}" "Build completed at ${CT_STOP_DATE_HUMAN}"
11.72 elapsed=$((CT_STOP_DATE-CT_STAR_DATE))
11.73 elapsed_min=$((elapsed/(60*1000*1000*1000)))
11.74 - elapsed_sec=`printf "%02d" $(((elapsed%(60*1000*1000*1000))/(1000*1000*1000)))`
11.75 - elapsed_csec=`printf "%02d" $(((elapsed%(1000*1000*1000))/(10*1000*1000)))`
11.76 + elapsed_sec=$(printf "%02d" $(((elapsed%(60*1000*1000*1000))/(1000*1000*1000))))
11.77 + elapsed_csec=$(printf "%02d" $(((elapsed%(1000*1000*1000))/(10*1000*1000))))
11.78 CT_DoLog ${level:-INFO} "(elapsed: ${elapsed_min}:${elapsed_sec}.${elapsed_csec})"
11.79 }
11.80
11.81 @@ -158,7 +158,7 @@
11.82 # Test the presence of a tool, or abort if not found
11.83 # Usage: CT_HasOrAbort <tool>
11.84 CT_HasOrAbort() {
11.85 - CT_TestAndAbort "\"${1}\" not found and needed for successful toolchain build." -z "`CT_Which \"${1}\"`"
11.86 + CT_TestAndAbort "'${1}' not found and needed for successful toolchain build." -z ""$(CT_Which "${1}")
11.87 return 0
11.88 }
11.89
11.90 @@ -183,7 +183,7 @@
11.91 # Memorise a step being done so that any error is caught
11.92 # Usage: CT_DoStep <loglevel> <message>
11.93 CT_DoStep() {
11.94 - local start=`CT_DoDate +%s%N`
11.95 + local start=$(CT_DoDate +%s%N)
11.96 CT_DoLog "$1" "================================================================="
11.97 CT_DoLog "$1" "$2"
11.98 CT_STEP_COUNT=$((CT_STEP_COUNT+1))
11.99 @@ -196,8 +196,8 @@
11.100 # End the step just being done
11.101 # Usage: CT_EndStep
11.102 CT_EndStep() {
11.103 - local stop=`CT_DoDate +%s%N`
11.104 - local duration=`printf "%032d" $((stop-${CT_STEP_START[${CT_STEP_COUNT}]})) |sed -r -e 's/([[:digit:]]{2})[[:digit:]]{7}$/\.\1/; s/^0+//; s/^\./0\./;'`
11.105 + local stop=$(CT_DoDate +%s%N)
11.106 + local duration=$(printf "%032d" $((stop-${CT_STEP_START[${CT_STEP_COUNT}]})) |sed -r -e 's/([[:digit:]]{2})[[:digit:]]{7}$/\.\1/; s/^0+//; s/^\./0\./;')
11.107 local level="${CT_STEP_LEVEL[${CT_STEP_COUNT}]}"
11.108 local message="${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}"
11.109 CT_STEP_COUNT=$((CT_STEP_COUNT-1))
11.110 @@ -225,7 +225,7 @@
11.111 # No such directory, fail back to guessing
11.112 case "$1" in
11.113 /*) echo "$1";;
11.114 - *) echo "`pwd`/$1";;
11.115 + *) echo "$(pwd)/$1";;
11.116 esac
11.117 fi
11.118
11.119 @@ -237,7 +237,7 @@
11.120 # Usage: CT_MktempDir foo
11.121 CT_MktempDir() {
11.122 # Some mktemp do not allow more than 6 Xs
11.123 - eval "$1"="`mktemp -q -d \"${CT_BUILD_DIR}/.XXXXXX\"`"
11.124 + eval "$1"=$(mktemp -q -d "${CT_BUILD_DIR}/.XXXXXX")
11.125 CT_TestOrAbort "Could not make temporary directory" -n "${!1}" -a -d "${!1}"
11.126 }
11.127
11.128 @@ -302,8 +302,8 @@
11.129 || true
11.130 }
11.131
11.132 -_wget=`CT_Which wget`
11.133 -_curl=`CT_Which curl`
11.134 +_wget=$(CT_Which wget)
11.135 +_curl=$(CT_Which curl)
11.136 # Wrapper function to call one of curl or wget
11.137 # Usage: CT_DoGetFile <URL>
11.138 CT_DoGetFile() {
11.139 @@ -330,9 +330,9 @@
11.140 esac
11.141
11.142 # Do we already have it?
11.143 - ext=`CT_GetFileExtension "${file}"`
11.144 + ext=$(CT_GetFileExtension "${file}")
11.145 if [ -n "${ext}" ]; then
11.146 - CT_DoLog DEBUG "Already have \"${file}\""
11.147 + CT_DoLog DEBUG "Already have '${file}'"
11.148 return 0
11.149 fi
11.150
11.151 @@ -341,27 +341,27 @@
11.152 # or, as a failover, a file without extension.
11.153 # Try local copy first, if it exists
11.154 for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar ''; do
11.155 - CT_DoLog DEBUG "Trying \"${CT_LOCAL_TARBALLS_DIR}/${file}${ext}\""
11.156 + CT_DoLog DEBUG "Trying '${CT_LOCAL_TARBALLS_DIR}/${file}${ext}'"
11.157 if [ -r "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" -a \
11.158 "${CT_FORCE_DOWNLOAD}" != "y" ]; then
11.159 - CT_DoLog EXTRA "Using \"${file}\" from local storage"
11.160 + CT_DoLog EXTRA "Using '${file}' from local storage"
11.161 ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
11.162 return 0
11.163 fi
11.164 done
11.165 # Try to download it
11.166 - CT_DoLog EXTRA "Retrieving \"${file}\" from network"
11.167 + CT_DoLog EXTRA "Retrieving '${file}' from network"
11.168 for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar ''; do
11.169 # Try all urls in turn
11.170 for url in "$@"; do
11.171 - CT_DoLog DEBUG "Trying \"${url}/${file}${ext}\""
11.172 + CT_DoLog DEBUG "Trying '${url}/${file}${ext}'"
11.173 CT_DoGetFile "${url}/${file}${ext}"
11.174 if [ -f "${file}${ext}" ]; then
11.175 # No need to test if the file already exists because
11.176 # it does NOT. If it did exist, we'd have been stopped
11.177 # above, when looking for local copies.
11.178 if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
11.179 - CT_DoLog EXTRA "Saving \"${file}\" to local storage"
11.180 + CT_DoLog EXTRA "Saving '${file}' to local storage"
11.181 mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" |CT_DoLog ALL
11.182 ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
11.183 fi
11.184 @@ -371,7 +371,7 @@
11.185 done
11.186 CT_Popd
11.187
11.188 - CT_Abort "Could not download \"${file}\", and not present in \"${CT_LOCAL_TARBALLS_DIR}\""
11.189 + CT_Abort "Could not download '${file}', and not present in '${CT_LOCAL_TARBALLS_DIR}'"
11.190 }
11.191
11.192 # Extract a tarball and patch the resulting sources if necessary.
11.193 @@ -380,13 +380,13 @@
11.194 # in the extra/locale sub-directory of uClibc.
11.195 CT_ExtractAndPatch() {
11.196 local file="$1"
11.197 - local base_file=`echo "${file}" |cut -d - -f 1`
11.198 - local ver_file=`echo "${file}" |cut -d - -f 2-`
11.199 + local base_file=$(echo "${file}" |cut -d - -f 1)
11.200 + local ver_file=$(echo "${file}" |cut -d - -f 2-)
11.201 local official_patch_dir
11.202 local custom_patch_dir
11.203 local libc_addon
11.204 - local ext=`CT_GetFileExtension "${file}"`
11.205 - CT_TestAndAbort "\"${file}\" not found in \"${CT_TARBALLS_DIR}\"" -z "${ext}"
11.206 + local ext=$(CT_GetFileExtension "${file}")
11.207 + CT_TestAndAbort "'${file}' not found in '${CT_TARBALLS_DIR}'" -z "${ext}"
11.208 local full_file="${CT_TARBALLS_DIR}/${file}${ext}"
11.209
11.210 CT_Pushd "${CT_SRC_DIR}"
11.211 @@ -394,14 +394,14 @@
11.212 # Add-ons need a little love, really.
11.213 case "${file}" in
11.214 glibc-[a-z]*-*)
11.215 - CT_TestAndAbort "Trying to extract the C-library addon/locales \"${file}\" when C-library not yet extracted" ! -d "${CT_LIBC_FILE}"
11.216 + CT_TestAndAbort "Trying to extract the C-library addon/locales '${file}' when C-library not yet extracted" ! -d "${CT_LIBC_FILE}"
11.217 cd "${CT_LIBC_FILE}"
11.218 libc_addon=y
11.219 [ -f ".${file}.extracted" ] && return 0
11.220 touch ".${file}.extracted"
11.221 ;;
11.222 uClibc-locale-*)
11.223 - CT_TestAndAbort "Trying to extract the C-library addon/locales \"${file}\" when C-library not yet extracted" ! -d "${CT_LIBC_FILE}"
11.224 + CT_TestAndAbort "Trying to extract the C-library addon/locales '${file}' when C-library not yet extracted" ! -d "${CT_LIBC_FILE}"
11.225 cd "${CT_LIBC_FILE}/extra/locale"
11.226 libc_addon=y
11.227 [ -f ".${file}.extracted" ] && return 0
11.228 @@ -411,16 +411,16 @@
11.229
11.230 # If the directory exists, then consider extraction and patching done
11.231 if [ -d "${file}" ]; then
11.232 - CT_DoLog DEBUG "Already extracted \"${file}\""
11.233 + CT_DoLog DEBUG "Already extracted '${file}'"
11.234 return 0
11.235 fi
11.236
11.237 - CT_DoLog EXTRA "Extracting \"${file}\""
11.238 + CT_DoLog EXTRA "Extracting '${file}'"
11.239 case "${ext}" in
11.240 .tar.bz2) tar xvjf "${full_file}" |CT_DoLog ALL;;
11.241 .tar.gz|.tgz) tar xvzf "${full_file}" |CT_DoLog ALL;;
11.242 .tar) tar xvf "${full_file}" |CT_DoLog ALL;;
11.243 - *) CT_Abort "Don't know how to handle \"${file}\": unknown extension" ;;
11.244 + *) CT_Abort "Don't know how to handle '${file}': unknown extension" ;;
11.245 esac
11.246
11.247 # Snapshots might not have the version number in the extracted directory
11.248 @@ -428,23 +428,23 @@
11.249 # Overcome this issue by symlink'ing the directory.
11.250 if [ ! -d "${file}" -a "${libc_addon}" != "y" ]; then
11.251 case "${ext}" in
11.252 - .tar.bz2) base=`tar tjf "${full_file}" |head -n 1 |cut -d / -f 1 || true`;;
11.253 - .tar.gz|.tgz) base=`tar tzf "${full_file}" |head -n 1 |cut -d / -f 1 || true`;;
11.254 - .tar) base=`tar tf "${full_file}" |head -n 1 |cut -d / -f 1 || true`;;
11.255 + .tar.bz2) base=$(tar tjf "${full_file}" |head -n 1 |cut -d / -f 1 || true);;
11.256 + .tar.gz|.tgz) base=$(tar tzf "${full_file}" |head -n 1 |cut -d / -f 1 || true);;
11.257 + .tar) base=$(tar tf "${full_file}" |head -n 1 |cut -d / -f 1 || true);;
11.258 esac
11.259 - CT_TestOrAbort "There was a problem when extracting \"${file}\"" -d "${base}" -o "${base}" != "${file}"
11.260 + CT_TestOrAbort "There was a problem when extracting '${file}'" -d "${base}" -o "${base}" != "${file}"
11.261 ln -s "${base}" "${file}"
11.262 fi
11.263
11.264 # Kludge: outside this function, we wouldn't know if we had just extracted
11.265 # a libc addon, or a plain package. Apply patches now.
11.266 - CT_DoLog EXTRA "Patching \"${file}\""
11.267 + CT_DoLog EXTRA "Patching '${file}'"
11.268
11.269 if [ "${libc_addon}" = "y" ]; then
11.270 # Some addon tarballs directly contain the correct addon directory,
11.271 # while others have the addon directory named after the tarball.
11.272 # Fix that by always using the short name (eg: linuxthreads, ports, etc...)
11.273 - addon_short_name=`echo "${file}" |sed -r -e 's/^[^-]+-//; s/-[^-]+$//;'`
11.274 + addon_short_name=$(echo "${file}" |sed -r -e 's/^[^-]+-//; s/-[^-]+$//;')
11.275 [ -d "${addon_short_name}" ] || ln -s "${file}" "${addon_short_name}"
11.276 # If libc addon, we're already in the correct place
11.277 else
11.278 @@ -459,9 +459,9 @@
11.279 if [ -n "${patch_dir}" -a -d "${patch_dir}" ]; then
11.280 for p in "${patch_dir}"/*.patch; do
11.281 if [ -f "${p}" ]; then
11.282 - CT_DoLog DEBUG "Applying patch \"${p}\""
11.283 + CT_DoLog DEBUG "Applying patch '${p}'"
11.284 patch -g0 -F1 -p1 -f <"${p}" |CT_DoLog ALL
11.285 - CT_TestAndAbort "Failed while applying patch file \"${p}\"" ${PIPESTATUS[0]} -ne 0
11.286 + CT_TestAndAbort "Failed while applying patch file '${p}'" ${PIPESTATUS[0]} -ne 0
11.287 fi
11.288 done
11.289 fi
11.290 @@ -542,7 +542,7 @@
11.291 case "${CT_KERNEL}" in
11.292 linux*) CT_TARGET_KERNEL=linux;;
11.293 esac
11.294 - CT_TARGET=`CT_DoConfigSub "${CT_TARGET_ARCH}-${CT_TARGET_VENDOR:-unknown}-${CT_TARGET_KERNEL}-${CT_TARGET_SYS}"`
11.295 + CT_TARGET=$(CT_DoConfigSub "${CT_TARGET_ARCH}-${CT_TARGET_VENDOR:-unknown}-${CT_TARGET_KERNEL}-${CT_TARGET_SYS}")
11.296
11.297 # Prepare the target CFLAGS
11.298 CT_ARCH_TARGET_CFLAGS="${CT_ARCH_ARCH_CFLAG}"
11.299 @@ -560,7 +560,7 @@
11.300 local foo
11.301 local message="${1:-Pausing for your pleasure}"
11.302 CT_DoLog INFO "${message}"
11.303 - read -p "Press \"Enter\" to continue, or Ctrl-C to stop..." foo >&6
11.304 + read -p "Press 'Enter' to continue, or Ctrl-C to stop..." foo >&6
11.305 return 0
11.306 }
11.307
11.308 @@ -572,7 +572,7 @@
11.309 local state_name="$1"
11.310 local state_dir="${CT_STATE_DIR}/${state_name}"
11.311
11.312 - CT_DoLog DEBUG "Saving state to restart at step \"${state_name}\"..."
11.313 + CT_DoLog DEBUG "Saving state to restart at step '${state_name}'..."
11.314 rm -rf "${state_dir}"
11.315 mkdir -p "${state_dir}"
11.316
11.317 @@ -590,17 +590,17 @@
11.318 $0 == "}" { _p = 1; }
11.319 ' >"${state_dir}/env.sh"
11.320
11.321 - CT_DoLog DEBUG " Saving CT_CC_CORE_STATIC_PREFIX_DIR=\"${CT_CC_CORE_STATIC_PREFIX_DIR}\""
11.322 + CT_DoLog DEBUG " Saving CT_CC_CORE_STATIC_PREFIX_DIR='${CT_CC_CORE_STATIC_PREFIX_DIR}'"
11.323 CT_Pushd "${CT_CC_CORE_STATIC_PREFIX_DIR}"
11.324 tar cv${tar_opt}f "${state_dir}/cc_core_static_prefix_dir.tar${tar_ext}" . |CT_DoLog DEBUG
11.325 CT_Popd
11.326
11.327 - CT_DoLog DEBUG " Saving CT_CC_CORE_SHARED_PREFIX_DIR=\"${CT_CC_CORE_SHARED_PREFIX_DIR}\""
11.328 + CT_DoLog DEBUG " Saving CT_CC_CORE_SHARED_PREFIX_DIR='${CT_CC_CORE_SHARED_PREFIX_DIR}'"
11.329 CT_Pushd "${CT_CC_CORE_SHARED_PREFIX_DIR}"
11.330 tar cv${tar_opt}f "${state_dir}/cc_core_shared_prefix_dir.tar${tar_ext}" . |CT_DoLog DEBUG
11.331 CT_Popd
11.332
11.333 - CT_DoLog DEBUG " Saving CT_PREFIX_DIR=\"${CT_PREFIX_DIR}\""
11.334 + CT_DoLog DEBUG " Saving CT_PREFIX_DIR='${CT_PREFIX_DIR}'"
11.335 CT_Pushd "${CT_PREFIX_DIR}"
11.336 tar cv${tar_opt}f "${state_dir}/prefix_dir.tar${tar_ext}" --exclude '*.log' . |CT_DoLog DEBUG
11.337 CT_Popd
11.338 @@ -624,13 +624,13 @@
11.339 local old_RESTART="${CT_RESTART}"
11.340 local old_STOP="${CT_STOP}"
11.341
11.342 - CT_TestOrAbort "The previous build did not reach the point where it could be restarted at \"${CT_RESTART}\"" -d "${state_dir}"
11.343 + CT_TestOrAbort "The previous build did not reach the point where it could be restarted at '${CT_RESTART}'" -d "${state_dir}"
11.344
11.345 # We need to do something special with the log file!
11.346 if [ "${CT_LOG_TO_FILE}" = "y" ]; then
11.347 exec >"${state_dir}/tail.log"
11.348 fi
11.349 - CT_DoLog INFO "Restoring state at step \"${state_name}\", as requested."
11.350 + CT_DoLog INFO "Restoring state at step '${state_name}', as requested."
11.351
11.352 case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in
11.353 y) tar_opt=z; tar_ext=.gz;;
11.354 @@ -642,17 +642,17 @@
11.355 rm -rf "${CT_PREFIX_DIR}" "${CT_CC_CORE_SHARED_PREFIX_DIR}" "${CT_CC_CORE_STATIC_PREFIX_DIR}"
11.356 mkdir -p "${CT_PREFIX_DIR}" "${CT_CC_CORE_SHARED_PREFIX_DIR}" "${CT_CC_CORE_STATIC_PREFIX_DIR}"
11.357
11.358 - CT_DoLog DEBUG " Restoring CT_PREFIX_DIR=\"${CT_PREFIX_DIR}\""
11.359 + CT_DoLog DEBUG " Restoring CT_PREFIX_DIR='${CT_PREFIX_DIR}'"
11.360 CT_Pushd "${CT_PREFIX_DIR}"
11.361 tar xv${tar_opt}f "${state_dir}/prefix_dir.tar${tar_ext}" |CT_DoLog DEBUG
11.362 CT_Popd
11.363
11.364 - CT_DoLog DEBUG " Restoring CT_CC_CORE_SHARED_PREFIX_DIR=\"${CT_CC_CORE_SHARED_PREFIX_DIR}\""
11.365 + CT_DoLog DEBUG " Restoring CT_CC_CORE_SHARED_PREFIX_DIR='${CT_CC_CORE_SHARED_PREFIX_DIR}'"
11.366 CT_Pushd "${CT_CC_CORE_SHARED_PREFIX_DIR}"
11.367 tar xv${tar_opt}f "${state_dir}/cc_core_shared_prefix_dir.tar${tar_ext}" |CT_DoLog DEBUG
11.368 CT_Popd
11.369
11.370 - CT_DoLog DEBUG " Restoring CT_CC_CORE_STATIC_PREFIX_DIR=\"${CT_CC_CORE_STATIC_PREFIX_DIR}\""
11.371 + CT_DoLog DEBUG " Restoring CT_CC_CORE_STATIC_PREFIX_DIR='${CT_CC_CORE_STATIC_PREFIX_DIR}'"
11.372 CT_Pushd "${CT_CC_CORE_STATIC_PREFIX_DIR}"
11.373 tar xv${tar_opt}f "${state_dir}/cc_core_static_prefix_dir.tar${tar_ext}" |CT_DoLog DEBUG
11.374 CT_Popd
12.1 --- a/scripts/saveSample.sh Mon May 19 21:41:19 2008 +0000
12.2 +++ b/scripts/saveSample.sh Tue May 20 21:32:39 2008 +0000
12.3 @@ -47,8 +47,8 @@
12.4 CT_DoAddFileToSample() {
12.5 source="$1"
12.6 dest="$2"
12.7 - inode_s=`ls -i "${source}"`
12.8 - inode_d=`ls -i "${dest}" 2>/dev/null || true`
12.9 + inode_s=$(ls -i "${source}")
12.10 + inode_d=$(ls -i "${dest}" 2>/dev/null || true)
12.11 if [ "${inode_s}" != "${inode_d}" ]; then
12.12 cp "${source}" "${dest}"
12.13 fi
13.1 --- a/scripts/tarball.sh.broken Mon May 19 21:41:19 2008 +0000
13.2 +++ b/scripts/tarball.sh.broken Tue May 20 21:32:39 2008 +0000
13.3 @@ -31,18 +31,18 @@
13.4 CT_TARBALLS_DIR="${CT_TOP_DIR}/targets/tarballs"
13.5 CT_TARBALLS=""
13.6 for dir in '' tools debug; do
13.7 - CT_DoStep DEBUG "Scanning directory \"${dir}\""
13.8 + CT_DoStep DEBUG "Scanning directory '${dir}'"
13.9 for script in "${CT_TOP_DIR}/scripts/build/${dir}/"*.sh; do
13.10 - CT_DoStep DEBUG "Testing component \"${script}\""
13.11 + CT_DoStep DEBUG "Testing component '${script}'"
13.12 [ -n "${script}" ] || continue
13.13 unset do_print_file_name
13.14 . "${script}"
13.15 - for file in `do_print_filename`; do
13.16 - CT_DoLog DEBUG "Finding tarball for \"${file}\""
13.17 + for file in $(do_print_filename); do
13.18 + CT_DoLog DEBUG "Finding tarball for '${file}'"
13.19 [ -n "${file}" ] || continue
13.20 - ext=`CT_GetFileExtension "${file}"`
13.21 - CT_TestOrAbort "Missing tarball for: \"${file}\"" -f "${CT_TOP_DIR}/targets/tarballs/${file}${ext}"
13.22 - CT_DoLog DEBUG "Found \"${file}${ext}\""
13.23 + ext=$(CT_GetFileExtension "${file}")
13.24 + CT_TestOrAbort "Missing tarball for: '${file}'" -f "${CT_TOP_DIR}/targets/tarballs/${file}${ext}"
13.25 + CT_DoLog DEBUG "Found '${file}${ext}'"
13.26 CT_TARBALLS="${CT_TARBALLS} ${file}${ext}"
13.27 done
13.28 CT_EndStep
13.29 @@ -57,10 +57,10 @@
13.30 CT_MktempDir tempdir
13.31
13.32 # Save crosstool-NG, as it is configured for the current toolchain.
13.33 -topdir=`basename "${CT_TOP_DIR}"`
13.34 +topdir=$(basename "${CT_TOP_DIR}")
13.35 CT_Pushd "${CT_TOP_DIR}/.."
13.36
13.37 -botdir=`pwd`
13.38 +botdir=$(pwd)
13.39
13.40 # Build the list of files to exclude
13.41 CT_DoLog DEBUG "Building list of files to exclude"
13.42 @@ -70,7 +70,7 @@
13.43 echo "${topdir}/targets/src"; \
13.44 echo "${topdir}/targets/tst"; \
13.45 echo "${topdir}/targets/*-*-*-*"; \
13.46 - for t in `ls -1 "${topdir}/targets/tarballs/"`; do \
13.47 + for t in $(ls -1 "${topdir}/targets/tarballs/"); do \
13.48 case " ${CT_TARBALLS} " in \
13.49 *" ${t} "*) ;; \
13.50 *) echo "${topdir}/targets/tarballs/${t}";; \
14.1 --- a/tools/addToolVersion.sh Mon May 19 21:41:19 2008 +0000
14.2 +++ b/tools/addToolVersion.sh Tue May 20 21:32:39 2008 +0000
14.3 @@ -66,7 +66,7 @@
14.4 --copy) tool_suffix=copy;;
14.5 # Misc:
14.6 -h|--help) doHelp; exit 0;;
14.7 - -*) echo "Unknown option: \"${!i}\" (use -h/--help for help)."; exit 1;;
14.8 + -*) echo "Unknown option: '${!i}' (use -h/--help for help)."; exit 1;;
14.9 *) VERSION="${VERSION} ${!i}";;
14.10 esac
14.11 i=$((i+1))
14.12 @@ -81,9 +81,9 @@
14.13
14.14 for ver in ${VERSION}; do
14.15 unset DEP L1 L2 L3 L4 L5 FILE
14.16 - v=`echo "${ver}" |sed -r -e 's/-/_/g; s/\./_/g;'`
14.17 + v=$(echo "${ver}" |sed -r -e 's/-/_/g; s/\./_/g;')
14.18 if [ "${cat}" = "KERNEL" ]; then
14.19 - TOOL_SUFFIX="`echo \"${tool_suffix}\" |tr [[:lower:]] [[:upper:]]`"
14.20 + TOOL_SUFFIX=$(echo "${tool_suffix}" |tr [[:lower:]] [[:upper:]])
14.21 L1="config ${cat}_${TOOL_SUFFIX}_V_${v}\n"
14.22 L2=" bool\n"
14.23 L3=" prompt \"${ver}${prompt_suffix}\"\n"
14.24 @@ -105,7 +105,7 @@
14.25 [ -n "${OBS}" ] && DEP="${DEP} && OBSOLETE"
14.26 case "${DEP}" in
14.27 "") ;;
14.28 - *) L4=" depends on `echo \"${DEP}\" |sed -r -e 's/^ \\&\\& //; s/\\&/\\\\&/g;'`\n"
14.29 + *) L4=" depends on "$(echo "${DEP}" |sed -r -e 's/^ \\&\\& //; s/\\&/\\\\&/g;')"\n"
14.30 esac
14.31 sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}${L4}"'\n\1/;
14.32 s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L5}"'\n\1/;' "${FILE}"
15.1 --- a/tools/populate.in Mon May 19 21:41:19 2008 +0000
15.2 +++ b/tools/populate.in Tue May 20 21:32:39 2008 +0000
15.3 @@ -39,10 +39,10 @@
15.4 h) doHelp
15.5 exit 0
15.6 ;;
15.7 - :) echo "$myname: \"-${OPTARG}\" takes exactly one argument."
15.8 + :) echo "$myname: '-${OPTARG}' takes exactly one argument."
15.9 exit 1
15.10 ;;
15.11 - ?) echo "$myname: unknown option \"-${OPTARG}\"."
15.12 + ?) echo "$myname: unknown option '-${OPTARG}'."
15.13 exit 1
15.14 ;;
15.15 esac
15.16 @@ -54,11 +54,11 @@
15.17 exit 1
15.18 fi
15.19 if [ ! -d "${CT_ROOT_SRC_DIR}" ]; then
15.20 - echo "$myname: \"${CT_ROOT_SRC_DIR}\": no such file or directory"
15.21 + echo "$myname: '${CT_ROOT_SRC_DIR}': no such file or directory"
15.22 exit 1
15.23 fi
15.24 if [ -d "${CT_ROOT_DST_DIR}" -a "${CT_FORCE}" != "y" ]; then
15.25 - echo "$myname: \"${CT_ROOT_DST_DIR}\": already exists"
15.26 + echo "$myname: '${CT_ROOT_DST_DIR}': already exists"
15.27 exit 1
15.28 fi
15.29 src_inode=$(ls -di "${CT_ROOT_SRC_DIR}")
15.30 @@ -91,9 +91,9 @@
15.31 ${CT_ECHO} "Looping..."
15.32 still_needed=0
15.33 for f in $(find . -type f -exec file {} \; |egrep ': ELF [[:digit:]]+-bit .SB (executable|shared object),' |cut -d ":" -f 1); do
15.34 - ${CT_ECHO} "Scanning \"${f}\""
15.35 + ${CT_ECHO} "Scanning '${f}'"
15.36 for libname in $("${CT_READELF}" -d "${f}" |egrep '(NEEDED)' |sed -r -e 's,.+\[(.+)\] *$,\1,;'); do
15.37 - ${CT_ECHO} " searching for \"${libname}\""
15.38 + ${CT_ECHO} " searching for '${libname}'"
15.39 if [ -e "lib/${libname}" \
15.40 -o -e "usr/lib/${libname}" ]; then
15.41 ${CT_ECHO} " already present"
15.42 @@ -101,14 +101,14 @@
15.43 fi
15.44 # Need to scan .. for libgcc_s et al.
15.45 for dir in . usr ..; do
15.46 - ${CT_ECHO} -n " trying in \"${dir}\""
15.47 + ${CT_ECHO} -n " trying in '${dir}'"
15.48 tgt_dir="${dir}"
15.49 [ "${tgt_dir}" = ".." ] && tgt_dir="usr"
15.50 libfile="${CT_SYSROOT_DIR}/${dir}/lib/${libname}"
15.51 - ${CT_ECHO} ": \"${libfile}\""
15.52 + ${CT_ECHO} ": '${libfile}'"
15.53 if [ -e "${libfile}" ]; then
15.54 mkdir -p "${dir}/lib"
15.55 - ${CT_ECHO} " installing \"${tgt_dir}/lib/${libname}\""
15.56 + ${CT_ECHO} " installing '${tgt_dir}/lib/${libname}'"
15.57 cp "${libfile}" "${tgt_dir}/lib/${libname}"
15.58 still_needed=1
15.59 break