From 0c4633c37fcfab7c1632330c070884c3295db1d2 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 20 May 2008 21:32:39 +0000 Subject: 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(-) --- tools/addToolVersion.sh | 8 ++++---- tools/populate.in | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'tools') diff --git a/tools/addToolVersion.sh b/tools/addToolVersion.sh index 2c35cc79..37e69402 100755 --- a/tools/addToolVersion.sh +++ b/tools/addToolVersion.sh @@ -66,7 +66,7 @@ while [ $i -le $# ]; do --copy) tool_suffix=copy;; # Misc: -h|--help) doHelp; exit 0;; - -*) echo "Unknown option: \"${!i}\" (use -h/--help for help)."; exit 1;; + -*) echo "Unknown option: '${!i}' (use -h/--help for help)."; exit 1;; *) VERSION="${VERSION} ${!i}";; esac i=$((i+1)) @@ -81,9 +81,9 @@ esac for ver in ${VERSION}; do unset DEP L1 L2 L3 L4 L5 FILE - v=`echo "${ver}" |sed -r -e 's/-/_/g; s/\./_/g;'` + v=$(echo "${ver}" |sed -r -e 's/-/_/g; s/\./_/g;') if [ "${cat}" = "KERNEL" ]; then - TOOL_SUFFIX="`echo \"${tool_suffix}\" |tr [[:lower:]] [[:upper:]]`" + TOOL_SUFFIX=$(echo "${tool_suffix}" |tr [[:lower:]] [[:upper:]]) L1="config ${cat}_${TOOL_SUFFIX}_V_${v}\n" L2=" bool\n" L3=" prompt \"${ver}${prompt_suffix}\"\n" @@ -105,7 +105,7 @@ for ver in ${VERSION}; do [ -n "${OBS}" ] && DEP="${DEP} && OBSOLETE" case "${DEP}" in "") ;; - *) L4=" depends on `echo \"${DEP}\" |sed -r -e 's/^ \\&\\& //; s/\\&/\\\\&/g;'`\n" + *) L4=" depends on "$(echo "${DEP}" |sed -r -e 's/^ \\&\\& //; s/\\&/\\\\&/g;')"\n" esac sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}${L4}"'\n\1/; s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L5}"'\n\1/;' "${FILE}" diff --git a/tools/populate.in b/tools/populate.in index 690dc5fb..c21248b0 100644 --- a/tools/populate.in +++ b/tools/populate.in @@ -39,10 +39,10 @@ while getopts ":s:d:fvh" CT_OPT; do h) doHelp exit 0 ;; - :) echo "$myname: \"-${OPTARG}\" takes exactly one argument." + :) echo "$myname: '-${OPTARG}' takes exactly one argument." exit 1 ;; - ?) echo "$myname: unknown option \"-${OPTARG}\"." + ?) echo "$myname: unknown option '-${OPTARG}'." exit 1 ;; esac @@ -54,11 +54,11 @@ if [ -z "${CT_ROOT_SRC_DIR}" -o -z "${CT_ROOT_DST_DIR}" ]; then exit 1 fi if [ ! -d "${CT_ROOT_SRC_DIR}" ]; then - echo "$myname: \"${CT_ROOT_SRC_DIR}\": no such file or directory" + echo "$myname: '${CT_ROOT_SRC_DIR}': no such file or directory" exit 1 fi if [ -d "${CT_ROOT_DST_DIR}" -a "${CT_FORCE}" != "y" ]; then - echo "$myname: \"${CT_ROOT_DST_DIR}\": already exists" + echo "$myname: '${CT_ROOT_DST_DIR}': already exists" exit 1 fi src_inode=$(ls -di "${CT_ROOT_SRC_DIR}") @@ -91,9 +91,9 @@ while [ ${still_needed} -eq 1 ]; do ${CT_ECHO} "Looping..." still_needed=0 for f in $(find . -type f -exec file {} \; |egrep ': ELF [[:digit:]]+-bit .SB (executable|shared object),' |cut -d ":" -f 1); do - ${CT_ECHO} "Scanning \"${f}\"" + ${CT_ECHO} "Scanning '${f}'" for libname in $("${CT_READELF}" -d "${f}" |egrep '(NEEDED)' |sed -r -e 's,.+\[(.+)\] *$,\1,;'); do - ${CT_ECHO} " searching for \"${libname}\"" + ${CT_ECHO} " searching for '${libname}'" if [ -e "lib/${libname}" \ -o -e "usr/lib/${libname}" ]; then ${CT_ECHO} " already present" @@ -101,14 +101,14 @@ while [ ${still_needed} -eq 1 ]; do fi # Need to scan .. for libgcc_s et al. for dir in . usr ..; do - ${CT_ECHO} -n " trying in \"${dir}\"" + ${CT_ECHO} -n " trying in '${dir}'" tgt_dir="${dir}" [ "${tgt_dir}" = ".." ] && tgt_dir="usr" libfile="${CT_SYSROOT_DIR}/${dir}/lib/${libname}" - ${CT_ECHO} ": \"${libfile}\"" + ${CT_ECHO} ": '${libfile}'" if [ -e "${libfile}" ]; then mkdir -p "${dir}/lib" - ${CT_ECHO} " installing \"${tgt_dir}/lib/${libname}\"" + ${CT_ECHO} " installing '${tgt_dir}/lib/${libname}'" cp "${libfile}" "${tgt_dir}/lib/${libname}" still_needed=1 break -- cgit v1.2.3