summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-02-17 18:42:31 (GMT)
committerGitHub <noreply@github.com>2017-02-17 18:42:31 (GMT)
commiteb8c9024b4fe51925aff3d8d158188a97034a445 (patch)
tree40fd555a6ccfca5b6c6b39af61248e6a0be6e452 /scripts
parent16b1bdb89410b67bcf85f67caee13682025cdde9 (diff)
parent4d17f393bdecbef632f4f6e2aa6ec44951c5a4c4 (diff)
Merge pull request #604 from stilor/strace-4.16
Strace 4.16
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/addToolVersion.sh2
-rwxr-xr-xscripts/patch-renumber.sh2
-rw-r--r--scripts/populate.in40
-rw-r--r--scripts/saveSample.sh.in2
-rw-r--r--scripts/xldd.in12
5 files changed, 29 insertions, 29 deletions
diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh
index cf2b594..5631a5f 100755
--- a/scripts/addToolVersion.sh
+++ b/scripts/addToolVersion.sh
@@ -73,7 +73,7 @@ addToolVersion() {
[ -f "${file}" ] || return 0
- v=$(echo "${version}" |"${sed_r}" -e 's/-/_/g; s/\./_/g;')
+ v=$(echo "${version}" |${sed_r} -e 's/-/_/g; s/\./_/g;')
config_ver_option="${cat}_V_${v}"
diff --git a/scripts/patch-renumber.sh b/scripts/patch-renumber.sh
index 5e8dbce..602f904 100755
--- a/scripts/patch-renumber.sh
+++ b/scripts/patch-renumber.sh
@@ -59,7 +59,7 @@ for p in "${src}/"*.patch*; do
newname="$(printf "%03d-%s" \
"${cpt}" \
"$( basename "${p}" \
- |"${sed_r}" -e 's/^[[:digit:]]+[-_]//' \
+ |${sed_r} -e 's/^[[:digit:]]+[-_]//' \
-e "${sed_re}" \
)" \
)"
diff --git a/scripts/populate.in b/scripts/populate.in
index b9ee2d0..e5d0b45 100644
--- a/scripts/populate.in
+++ b/scripts/populate.in
@@ -15,19 +15,19 @@ awk="@@CT_awk@@"
CT_PREFIX_DIR="$(cd "$(dirname "$0")/.."; pwd)"
CT_GCC="${0%-populate}-gcc"
CT_READELF="${0%-populate}-readelf"
-CT_CFG_PREFIX_DIR="$("${CT_GCC}" -v 2>&1 \
+CT_CFG_PREFIX_DIR="$(${CT_GCC} -v 2>&1 \
|tr ' ' '\n' \
- |"${grep}" -E -- '--prefix=' \
+ |${grep} -E -- '--prefix=' \
|cut -d = -f 2-
)"
-CT_CFG_SYSROOT_DIR="$("${CT_GCC}" -v 2>&1 \
- |tr ' ' '\n' \
- |"${grep}" -E -- '--with-sysroot=' \
+CT_CFG_SYSROOT_DIR="$(${CT_GCC} -v 2>&1 \
+ |tr ' ' '\n' \
+ |${grep} -E -- '--with-sysroot=' \
|cut -d = -f 2-
)"
-CT_SYSROOT_DIR="$(printf "${CT_CFG_SYSROOT_DIR}\n" \
- |"${sed_r}" -e "s:^${CT_CFG_PREFIX_DIR}:${CT_PREFIX_DIR}:;" \
- |"${sed_r}" -e 's,/+,/,g;' \
+CT_SYSROOT_DIR="$(printf "${CT_CFG_SYSROOT_DIR}\n" \
+ |${sed_r} -e "s:^${CT_CFG_PREFIX_DIR}:${CT_PREFIX_DIR}:;" \
+ -e 's,/+,/,g;' \
)"
myname=$(basename "$0")
@@ -198,9 +198,9 @@ do_add_lib() {
${CT_PRINTF} ": '%s'\n" "${libfile}"
if [ -e "${libfile}" ]; then
mkdir -p "${dir}"
- true_libname=$("${CT_READELF}" -d "${libfile}" \
- |"${grep}" "Library soname:" \
- |"${sed_r}" -e 's,.+\[(.+)\] *$,\1,;' \
+ true_libname=$("${CT_READELF}" -d "${libfile}" \
+ |${grep} "Library soname:" \
+ |${sed_r} -e 's,.+\[(.+)\] *$,\1,;' \
)
case "${libfile}" in
*/ld*) mode=0755;;
@@ -225,9 +225,9 @@ do_resolve_deps() {
local file="${1}"
local libname
- for libname in $("${CT_READELF}" -d "${file}" \
- |"${grep}" -E '\(NEEDED\)[[:space:]]+Shared library:' \
- |"${sed_r}" -e 's,.+\[(.+)\] *$,\1,;' \
+ for libname in $("${CT_READELF}" -d "${file}" \
+ |${grep} -E '\(NEEDED\)[[:space:]]+Shared library:' \
+ |${sed_r} -e 's,.+\[(.+)\] *$,\1,;' \
); do
[ -n "${libname}" ] || continue
${CT_PRINTF} "Searching for '%s' needed by '%s'\n" "${libname}" "${file}"
@@ -244,15 +244,15 @@ cd "${CT_ROOT_DST_DIR}"
# First of, copy the forced libraries into the working copy
lib_list=
if [ -n "${CT_LIB_FILE}" ]; then
- lib_list=$("${sed_r}" -e ':loop; s/#.*//;' \
- -e 's/[[:space:]]+//g;' \
- -e 's/([^:])$/\1:/;' \
- -e '/$/N; s/\n//; tloop;' \
+ lib_list=$(${sed_r} -e ':loop; s/#.*//;' \
+ -e 's/[[:space:]]+//g;' \
+ -e 's/([^:])$/\1:/;' \
+ -e '/$/N; s/\n//; tloop;' \
"${CT_LIB_FILE}"
)
fi
CT_LIB_LIST=$(printf "${CT_LIB_LIST}:${lib_list}\n" \
- |"${sed_r}" -e 's/^:+//; s/:+$//; s/:+/ /g;' \
+ |${sed_r} -e 's/^:+//; s/:+$//; s/:+/ /g;' \
)
if [ -n "${CT_LIB_LIST}" ]; then
for name in ${CT_LIB_LIST}; do
@@ -283,7 +283,7 @@ trap "rm -rf ${CT_TMP_DIR}" EXIT
# List all ELF (executables|shared objects)...
find . -type f -exec file {} \; \
-|"${grep}" -E ': ELF [[:digit:]]+-bit (L|M)SB +(executable|shared object),' \
+|${grep} -E ': ELF [[:digit:]]+-bit (L|M)SB +(executable|shared object),' \
|cut -d ":" -f 1 \
>"${CT_TMP_DIR}/files.list"
diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in
index 3160d26..cab9b7f 100644
--- a/scripts/saveSample.sh.in
+++ b/scripts/saveSample.sh.in
@@ -75,7 +75,7 @@ fi
if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then
# We save the file, and then point the saved sample to this file
CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "${samp_dir}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
- "${sed_r}" -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
+ ${sed_r} -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
.defconfig
else
# remove any dangling files
diff --git a/scripts/xldd.in b/scripts/xldd.in
index 9aa8b61..cea0394 100644
--- a/scripts/xldd.in
+++ b/scripts/xldd.in
@@ -258,9 +258,9 @@ do_process_file() {
do_trace "Parsing file '%s'\n" "${file}"
save_search_rpath=( "${search_rpath[@]}" )
- for n in $( "${readelf}" -d "${file}" \
- |"${grep}" -E '\((RPATH|RUNPATH)\)' \
- |"${sed_r}" -e 's/^.*Library r(|un)path:[[:space:]]+\[(.*)\]$/\2/;'\
+ for n in $( ${readelf} -d "${file}" \
+ |${grep} -E '\((RPATH|RUNPATH)\)' \
+ |${sed_r} -e 's/^.*Library r(|un)path:[[:space:]]+\[(.*)\]$/\2/;'\
); do
do_trace "-> adding rpath '%s'\n" "${n}"
search_rpath+=( "${n}" )
@@ -271,9 +271,9 @@ do_process_file() {
done
do_trace ": end search path\n"
- for n in $( "${readelf}" -d "${file}" \
- |"${grep}" -E '\(NEEDED\)' \
- |"${sed_r}" -e 's/^.*Shared library:[[:space:]]+\[([^]]+)\].*/\1/;' \
+ for n in $( ${readelf} -d "${file}" \
+ |${grep} -E '\(NEEDED\)' \
+ |${sed_r} -e 's/^.*Shared library:[[:space:]]+\[([^]]+)\].*/\1/;' \
); do
found=0
for m in "${needed_list[@]}"; do