diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-05-20 21:32:39 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-05-20 21:32:39 (GMT) |
commit | 0c4633c37fcfab7c1632330c070884c3295db1d2 (patch) | |
tree | 5fdc1c68e709845d81b7f29df9c63f86d4f0397b /scripts/build | |
parent | 62c87c5adf144f0600cdaeedfc159376cf819c79 (diff) |
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(-)
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/cc_gcc.sh | 14 | ||||
-rw-r--r-- | scripts/build/debug/100-dmalloc.sh | 2 | ||||
-rw-r--r-- | scripts/build/debug/200-duma.sh | 6 | ||||
-rw-r--r-- | scripts/build/debug/300-gdb.sh | 8 | ||||
-rw-r--r-- | scripts/build/debug/400-ltrace.sh | 2 | ||||
-rw-r--r-- | scripts/build/kernel_linux.sh | 30 | ||||
-rw-r--r-- | scripts/build/libc_glibc.sh | 50 | ||||
-rw-r--r-- | scripts/build/libc_uClibc.sh | 4 | ||||
-rw-r--r-- | scripts/build/tools/200-sstrip.sh | 16 |
9 files changed, 66 insertions, 66 deletions
diff --git a/scripts/build/cc_gcc.sh b/scripts/build/cc_gcc.sh index 49ef922..7818173 100644 --- a/scripts/build/cc_gcc.sh +++ b/scripts/build/cc_gcc.sh @@ -62,7 +62,7 @@ do_cc_core_static() { [ "${CT_CC_CXA_ATEXIT}" = "y" ] && extra_config="${extra_config} --enable-__cxa_atexit" [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}" - CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" + CT_DoLog DEBUG "Extra config passed: '${extra_config}'" # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532) CC_FOR_BUILD="${CT_CC_NATIVE}" \ @@ -117,7 +117,7 @@ do_cc_core_shared() { [ "${CT_CC_CXA_ATEXIT}" = "y" ] && extra_config="${extra_config} --enable-__cxa_atexit" [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}" - CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" + CT_DoLog DEBUG "Extra config passed: '${extra_config}'" CC_FOR_BUILD="${CT_CC_NATIVE}" \ CFLAGS="${CT_CFLAGS_FOR_HOST}" \ @@ -210,7 +210,7 @@ do_cc() { CT_Test "Building Objective-C language is not yet supported. Will try..." "${CT_CC_LANG_OBJC}" = "y" CT_Test "Building Objective-C++ language is not yet supported. Will try..." "${CT_CC_LANG_OBJCXX}" = "y" CT_Test "Building ${CT_CC_LANG_OTHERS//,/ } language(s) is not yet supported. Will try..." -n "${CT_CC_LANG_OTHERS}" - lang_opt=`echo "${lang_opt},${CT_CC_LANG_OTHERS}" |sed -r -e 's/,+/,/g; s/,*$//;'` + lang_opt=$(echo "${lang_opt},${CT_CC_LANG_OTHERS}" |sed -r -e 's/,+/,/g; s/,*$//;') extra_config="--enable-languages=${lang_opt}" 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}" @@ -223,7 +223,7 @@ do_cc() { fi [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}" - CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" + CT_DoLog DEBUG "Extra config passed: '${extra_config}'" # --enable-symvers=gnu really only needed for sh4 to work around a # detection problem only matters for gcc-3.2.x and later, I think. @@ -262,10 +262,10 @@ do_cc() { gcc-3.3.[34]) case "${CT_TARGET}" in powerpc64-unknown-linux-gnu|x86_64-unknown-linux-gnu) - for d in `find "${CT_SYSROOT_DIR}" -name lib -type d -empty`; do - if [ -d `dirname "${d}"`/lib64 ] ; then + for d in $(find "${CT_SYSROOT_DIR}" -name lib -type d -empty); do + if [ -d $(dirname "${d}")/lib64 ] ; then rm -rf "${d}" - ln -s `dirname "${d}"`/lib64 "${d}" + ln -s $(dirname "${d}")/lib64 "${d}" fi done ;; *) ;; diff --git a/scripts/build/debug/100-dmalloc.sh b/scripts/build/debug/100-dmalloc.sh index ff54373..46dd728 100644 --- a/scripts/build/debug/100-dmalloc.sh +++ b/scripts/build/debug/100-dmalloc.sh @@ -36,7 +36,7 @@ do_debug_dmalloc_build() { *) extra_config="${extra_config} --disable-shlib";; esac - CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" + CT_DoLog DEBUG "Extra config passed: '${extra_config}'" LD="${CT_TARGET}-ld" \ AR="${CT_TARGET}-ar" \ diff --git a/scripts/build/debug/200-duma.sh b/scripts/build/debug/200-duma.sh index fa3708b..b9c1ac6 100644 --- a/scripts/build/debug/200-duma.sh +++ b/scripts/build/debug/200-duma.sh @@ -13,7 +13,7 @@ do_debug_duma_get() { # but with an underscore. Create a link so that crosstool-NG can # work correctly: cd "${CT_TARBALLS_DIR}" - duma_ext=`CT_GetFileExtension "duma_${CT_DUMA_VERSION}"` + duma_ext=$(CT_GetFileExtension "duma_${CT_DUMA_VERSION}") rm -f "duma-${CT_DUMA_VERSION}${duma_ext}" ln -sf "duma_${CT_DUMA_VERSION}${duma_ext}" "duma-${CT_DUMA_VERSION}${duma_ext}" } @@ -38,14 +38,14 @@ do_debug_duma_build() { [ "${CT_DUMA_A}" = "y" ] && libs="${libs} libduma.a" [ "${CT_DUMA_SO}" = "y" ] && libs="${libs} libduma.so.0.0" for lib in ${libs}; do - CT_DoLog EXTRA "Building library \"${lib}\"" + CT_DoLog EXTRA "Building library '${lib}'" make HOSTCC="${CT_CC_NATIVE}" \ HOSTCXX="${CT_CC_NATIVE}" \ CC="${CT_TARGET}-${CT_CC}" \ CXX="${CT_TARGET}-${CT_CC}" \ DUMA_CPP="${DUMA_CPP}" \ ${libs} 2>&1 |CT_DoLog ALL - CT_DoLog EXTRA "Installing library \"${lib}\"" + CT_DoLog EXTRA "Installing library '${lib}'" install -m 644 "${lib}" "${CT_SYSROOT_DIR}/usr/lib" 2>&1 |CT_DoLog ALL done if [ "${CT_DUMA_SO}" = "y" ]; then diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 2c27398..aa26e97 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -4,7 +4,7 @@ is_enabled="${CT_GDB}" do_print_filename() { [ "${CT_GDB}" = "y" ] || return 0 - echo "gdb`do_debug_gdb_suffix`" + echo "gdb$(do_debug_gdb_suffix)" } do_debug_gdb_suffix() { @@ -15,17 +15,17 @@ do_debug_gdb_suffix() { } do_debug_gdb_get() { - CT_GetFile "gdb`do_debug_gdb_suffix`" \ + CT_GetFile "gdb$(do_debug_gdb_suffix)" \ {ftp,http}://ftp.gnu.org/pub/gnu/gdb \ ftp://sources.redhat.com/pub/gdb/{{,old-}releases,snapshots/current} } do_debug_gdb_extract() { - CT_ExtractAndPatch "gdb`do_debug_gdb_suffix`" + CT_ExtractAndPatch "gdb$(do_debug_gdb_suffix)" } do_debug_gdb_build() { - gdb_src_dir="${CT_SRC_DIR}/gdb`do_debug_gdb_suffix`" + gdb_src_dir="${CT_SRC_DIR}/gdb$(do_debug_gdb_suffix)" extra_config= # Version 6.3 and below behave badly with gdbmi diff --git a/scripts/build/debug/400-ltrace.sh b/scripts/build/debug/400-ltrace.sh index d64dc80..12bc092 100644 --- a/scripts/build/debug/400-ltrace.sh +++ b/scripts/build/debug/400-ltrace.sh @@ -11,7 +11,7 @@ do_debug_ltrace_get() { CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" {ftp,http}://ftp.de.debian.org/debian/pool/main/l/ltrace/ # Create a link so that the following steps are easier to do: cd "${CT_TARBALLS_DIR}" - ltrace_ext=`CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig"` + ltrace_ext=$(CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig") ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" "ltrace-${CT_LTRACE_VERSION}${ltrace_ext}" } diff --git a/scripts/build/kernel_linux.sh b/scripts/build/kernel_linux.sh index 07005e0..745282a 100644 --- a/scripts/build/kernel_linux.sh +++ b/scripts/build/kernel_linux.sh @@ -44,10 +44,10 @@ do_kernel_check_config() { mkdir -p "${CT_BUILD_DIR}/build-kernel-defconfig" cd "${CT_BUILD_DIR}/build-kernel-defconfig" - make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" O=`pwd` \ + make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" O=$(pwd) \ ARCH=${CT_KERNEL_ARCH} defconfig 2>&1 |CT_DoLog ALL - CT_KERNEL_LINUX_CONFIG_FILE="`pwd`/.config" + CT_KERNEL_LINUX_CONFIG_FILE="$(pwd)/.config" CT_EndStep fi @@ -64,20 +64,20 @@ do_kernel_headers() { # We need to enter this directory to find the kernel version strings cd "${CT_SRC_DIR}/${CT_KERNEL_FILE}" if [ "${CT_KERNEL_LINUX_HEADERS_SANITISED}" != "y" ]; then - k_version=`awk '/^VERSION =/ { print $3 }' Makefile` - k_patchlevel=`awk '/^PATCHLEVEL =/ { print $3 }' Makefile` - k_sublevel=`awk '/^SUBLEVEL =/ { print $3 }' Makefile` - k_extraversion=`awk '/^EXTRAVERSION =/ { print $3 }' Makefile` + k_version=$(awk '/^VERSION =/ { print $3 }' Makefile) + k_patchlevel=$(awk '/^PATCHLEVEL =/ { print $3 }' Makefile) + k_sublevel=$(awk '/^SUBLEVEL =/ { print $3 }' Makefile) + k_extraversion=$(awk '/^EXTRAVERSION =/ { print $3 }' Makefile) else - k_version=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 1` - k_patchlevel=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 2` - k_sublevel=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 3` - k_extraversion=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 4` + k_version=$(echo "${CT_KERNEL_VERSION}." |cut -d . -f 1) + k_patchlevel=$(echo "${CT_KERNEL_VERSION}." |cut -d . -f 2) + k_sublevel=$(echo "${CT_KERNEL_VERSION}." |cut -d . -f 3) + k_extraversion=$(echo "${CT_KERNEL_VERSION}." |cut -d . -f 4) fi case "${k_version}.${k_patchlevel}" in 2.2|2.4|2.6) ;; - *) CT_Abort "Unsupported kernel version \"linux-${k_version}.${k_patchlevel}\".";; + *) CT_Abort "Unsupported kernel version 'linux-${k_version}.${k_patchlevel}'.";; esac # Kernel version that support verbosity will use this, others will ignore it: @@ -109,7 +109,7 @@ do_kernel_install() { CT_DoLog EXTRA "Installing kernel headers" make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" \ - O="`pwd`" \ + O=$(pwd) \ ARCH=${CT_KERNEL_ARCH} \ INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \ ${V_OPT} \ @@ -118,7 +118,7 @@ do_kernel_install() { if [ "${CT_KERNEL_LINUX_HEADERS_INSTALL_CHECK}" = "y" ]; then CT_DoLog EXTRA "Checking installed headers" make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" \ - O="`pwd`" \ + O=$(pwd) \ ARCH=${CT_KERNEL_ARCH} \ INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \ ${V_OPT} \ @@ -154,7 +154,7 @@ do_kernel_copy() { cd "${CT_BUILD_DIR}/build-kernel-headers" cp "${CT_KERNEL_LINUX_CONFIG_FILE}" .config CT_DoYes "" |make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" \ - O="`pwd`" ${V_OPT} ARCH=${CT_KERNEL_ARCH} \ + O=$(pwd) ${V_OPT} ARCH=${CT_KERNEL_ARCH} \ oldconfig case "${CT_KERNEL_ARCH}" in sh*) # sh does secret stuff in 'make prepare' that can't be @@ -166,7 +166,7 @@ do_kernel_copy() { ARCH=${CT_KERNEL_ARCH} ${V_OPT} \ prepare include/linux/version.h ;; - arm*|cris*) make ${PARALLELMFLAGS} \ + arm*|cris*) make ${PARALLELMFLAGS} \ ARCH=${CT_KERNEL_ARCH} ${V_OPT} \ include/asm include/linux/version.h \ include/asm-${CT_KERNEL_ARCH}/.arch diff --git a/scripts/build/libc_glibc.sh b/scripts/build/libc_glibc.sh index b7410cd..2d9568a 100644 --- a/scripts/build/libc_glibc.sh +++ b/scripts/build/libc_glibc.sh @@ -5,7 +5,7 @@ do_print_filename() { [ "${CT_LIBC}" = "glibc" ] || return 0 echo "glibc-${CT_LIBC_VERSION}" - for addon in `do_libc_add_ons_list " "`; do + for addon in $(do_libc_add_ons_list " "); do # NPTL addon is not to be downloaded, in any case [ "${addon}" = "nptl" ] && continue || true echo "glibc-${addon}-${CT_LIBC_VERSION}" @@ -20,7 +20,7 @@ do_libc_get() { CT_GetFile "${CT_LIBC_FILE}" {ftp,http}://ftp.gnu.org/gnu/glibc # C library addons - for addon in `do_libc_add_ons_list " "`; do + for addon in $(do_libc_add_ons_list " "); do # NPTL addon is not to be downloaded, in any case [ "${addon}" = "nptl" ] && continue || true CT_GetFile "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" {ftp,http}://ftp.gnu.org/gnu/glibc @@ -34,7 +34,7 @@ do_libc_extract() { CT_ExtractAndPatch "${CT_LIBC_FILE}" # C library addons - for addon in `do_libc_add_ons_list " "`; do + for addon in $(do_libc_add_ons_list " "); do # NPTL addon is not to be extracted, in any case [ "${addon}" = "nptl" ] && continue || true CT_ExtractAndPatch "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" @@ -77,15 +77,15 @@ do_libc_headers() { # Override libc_cv_ppc_machine so glibc-cvs doesn't complain # 'a version of binutils that supports .machine "altivec" is needed'. - addons_config="--enable-add-ons=`do_libc_add_ons_list ,`" + addons_config="--enable-add-ons=$(do_libc_add_ons_list ,)" # We need to remove any threading addon when installing headers addons_config="${addons_config//nptl/}" addons_config="${addons_config//linuxthreads/}" - addons_config=`echo "${addons_config}" |sed -r -e 's/^,+//; s/,+$//; s/,+/,/g;'` + addons_config=$(echo "${addons_config}" |sed -r -e 's/^,+//; s/,+$//; s/,+/,/g;') - cross_cc=`CT_Which "${CT_TARGET}-gcc"` - CT_DoLog DEBUG "Using gcc for target: \"${cross_cc}\"" - CT_DoLog DEBUG "Extra config passed : \"${addons_config}\"" + cross_cc=$(CT_Which "${CT_TARGET}-gcc") + CT_DoLog DEBUG "Using gcc for target: '${cross_cc}'" + CT_DoLog DEBUG "Extra config passed : '${addons_config}'" libc_cv_ppc_machine=yes \ CC=${cross_cc} \ @@ -196,7 +196,7 @@ do_libc_start_files() { extra_config="" case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in *enable-kernel*) ;; - *) extra_config="${extra_config} --enable-kernel=`echo ${CT_KERNEL_VERSION} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;'`" + *) extra_config="${extra_config} --enable-kernel=$(echo ${CT_KERNEL_VERSION} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;')" esac case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in *-tls*) ;; @@ -213,7 +213,7 @@ do_libc_start_files() { # Obviously, we want threads, as we come here only for NPTL extra_config="${extra_config} --with-__thread" - addons_config="--enable-add-ons=`do_libc_add_ons_list ,`" + addons_config="--enable-add-ons=$(do_libc_add_ons_list ,)" extra_config="${extra_config} ${addons_config}" # Add some default CC args @@ -229,11 +229,11 @@ do_libc_start_files() { fi extra_cc_args="${extra_cc_args} ${CT_ARCH_ENDIAN_OPT}" - cross_cc=`CT_Which "${CT_TARGET}-gcc"` - CT_DoLog DEBUG "Using gcc for target : \"${cross_cc}\"" - CT_DoLog DEBUG "Configuring with addons : \"`do_libc_add_ons_list ,`\"" - CT_DoLog DEBUG "Extra config args passed: \"${extra_config}\"" - CT_DoLog DEBUG "Extra CC args passed : \"${extra_cc_args}\"" + cross_cc=$(CT_Which "${CT_TARGET}-gcc") + CT_DoLog DEBUG "Using gcc for target : '${cross_cc}'" + CT_DoLog DEBUG "Configuring with addons : '$(do_libc_add_ons_list ,)'" + CT_DoLog DEBUG "Extra config args passed: '${extra_config}'" + CT_DoLog DEBUG "Extra CC args passed : '${extra_cc_args}'" # Super-H really needs to set configparms as of gcc-3.4/glibc-2.3.2 # note: this is awkward, doesn't work well if you need more than one @@ -292,7 +292,7 @@ do_libc() { # We don't need to be conditional on wether the user did set different # values, as they CT_LIBC_GLIBC_EXTRA_CONFIG is passed after extra_config - extra_config="--enable-kernel=`echo ${CT_KERNEL_VERSION} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;'`" + extra_config="--enable-kernel=$(echo ${CT_KERNEL_VERSION} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;')" case "${CT_THREADS}" in nptl) extra_config="${extra_config} --with-__thread --with-tls";; @@ -315,9 +315,9 @@ do_libc() { ,y) extra_config="${extra_config} --without-fp";; esac - case "`do_libc_add_ons_list ,`" in + case "$(do_libc_add_ons_list ,)" in "") ;; - *) extra_config="${extra_config} --enable-add-ons=`do_libc_add_ons_list ,`";; + *) extra_config="${extra_config} --enable-add-ons=$(do_libc_add_ons_list ,)";; esac @@ -334,11 +334,11 @@ do_libc() { fi extra_cc_args="${extra_cc_args} ${CT_ARCH_ENDIAN_OPT}" - cross_cc=`CT_Which "${CT_TARGET}-gcc"` - CT_DoLog DEBUG "Using gcc for target : \"${cross_cc}\"" - CT_DoLog DEBUG "Configuring with addons : \"`do_libc_add_ons_list ,`\"" - CT_DoLog DEBUG "Extra config args passed: \"${extra_config}\"" - CT_DoLog DEBUG "Extra CC args passed : \"${extra_cc_args}\"" + cross_cc=$(CT_Which "${CT_TARGET}-gcc") + CT_DoLog DEBUG "Using gcc for target : '${cross_cc}'" + CT_DoLog DEBUG "Configuring with addons : '$(do_libc_add_ons_list ,)'" + CT_DoLog DEBUG "Extra config args passed: '${extra_config}'" + CT_DoLog DEBUG "Extra CC args passed : '${extra_cc_args}'" # sh3 and sh4 really need to set configparms as of gcc-3.4/glibc-2.3.2 # note: this is awkward, doesn't work well if you need more than one line in configparms @@ -446,7 +446,7 @@ do_libc() { for dir in lib lib64 usr/lib usr/lib64; do if [ -f "${CT_SYSROOT_DIR}/${dir}/${file}" -a ! -L ${CT_SYSROOT_DIR}/$lib/$file ]; then cp "${CT_SYSROOT_DIR}/${dir}/${file}" "${CT_SYSROOT_DIR}/${dir}/${file}_orig" - CT_DoLog DEBUG "Fixing \"${CT_SYS_ROOT_DIR}/${dir}/${file}\"" + CT_DoLog DEBUG "Fixing '${CT_SYS_ROOT_DIR}/${dir}/${file}'" sed -i -r -e 's,/usr/lib/,,g; s,/usr/lib64/,,g; s,/lib/,,g; @@ -488,7 +488,7 @@ do_libc_finish() { # Build up the addons list, separated with $1 do_libc_add_ons_list() { local sep="$1" - local addons_list=`echo "${CT_LIBC_ADDONS_LIST//,/${sep}}" |tr -s ,` + local addons_list=$(echo "${CT_LIBC_ADDONS_LIST//,/${sep}}" |tr -s ,) case "${CT_THREADS}" in none) ;; *) addons_list="${addons_list}${sep}${CT_THREADS}";; diff --git a/scripts/build/libc_uClibc.sh b/scripts/build/libc_uClibc.sh index 42ac5d9..41dc62f 100644 --- a/scripts/build/libc_uClibc.sh +++ b/scripts/build/libc_uClibc.sh @@ -218,8 +218,8 @@ ENDSED # From http://www.uclibc.org/cgi-bin/viewcvs.cgi?rev=16846&view=rev # " we just want the kernel headers, not the whole kernel source ... # " so people may need to update their paths slightly - quoted_kernel_source=`echo "${CT_HEADERS_DIR}" | sed -r -e 's,/include/?$,,; s,/,\\\\/,g;'` - quoted_headers_dir=`echo ${CT_HEADERS_DIR} | sed -r -e 's,/,\\\\/,g;'` + quoted_kernel_source=$(echo "${CT_HEADERS_DIR}" | sed -r -e 's,/include/?$,,; s,/,\\/,g;') + quoted_headers_dir=$(echo "${CT_HEADERS_DIR}" | sed -r -e 's,/,\\/,g;') # CROSS_COMPILER_PREFIX is left as is, as the CROSS parameter is forced on the command line # DEVEL_PREFIX is left as '/usr/' because it is post-pended to $PREFIX, wich is the correct value of ${PREFIX}/${TARGET} # Some (old) versions of uClibc use KERNEL_SOURCE (which is _wrong_), and diff --git a/scripts/build/tools/200-sstrip.sh b/scripts/build/tools/200-sstrip.sh index 5afdcb0..5be5b40 100644 --- a/scripts/build/tools/200-sstrip.sh +++ b/scripts/build/tools/200-sstrip.sh @@ -42,24 +42,24 @@ case "${CT_SSTRIP_FROM}" in return 0 fi if [ -f "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" ]; then - CT_DoLog EXTRA "Using \"sstrip\" from local storage" + CT_DoLog EXTRA "Using 'sstrip' from local storage" ln -sf "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" \ "${CT_TARBALLS_DIR}/sstrip.c" 2>&1 |CT_DoLog ALL return 0 fi CT_Pushd "${CT_TARBALLS_DIR}" - CT_DoLog EXTRA "Retrieving \"sstrip\" from network" - http_data=`lynx -dump "${sstrip_url}"` - link=`echo -en "${http_data}" \ + CT_DoLog EXTRA "Retrieving 'sstrip' from network" + http_data=$(lynx -dump "${sstrip_url}") + link=$(echo -en "${http_data}" \ |egrep '\[[[:digit:]]+\]download' \ - |sed -r -e 's/.*\[([[:digit:]]+)\]download.*/\1/;'` - rev_url=`echo -en "${http_data}" \ + |sed -r -e 's/.*\[([[:digit:]]+)\]download.*/\1/;') + rev_url=$(echo -en "${http_data}" \ |egrep '^ *8\.' \ - |sed -r -e 's/^ *'${link}'\. +(.+)$/\1/;'` + |sed -r -e 's/^ *'${link}'\. +(.+)$/\1/;') CT_DoGetFile "${rev_url}" 2>&1 |CT_DoLog ALL mv -v sstrip.c?* sstrip.c 2>&1 |CT_DoLog DEBUG if [ "${CT_SAVE_TARBALLS}" = "y" ]; then - CT_DoLog EXTRA "Saving \"sstrip.c\" to local storage" + CT_DoLog EXTRA "Saving 'sstrip.c' to local storage" cp -v sstrip.c "${CT_LOCAL_TARBALLS_DIR}" 2>&1 |CT_DoLog DEBUG fi CT_Popd |