summaryrefslogtreecommitdiff
path: root/scripts/populate.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/populate.in')
-rw-r--r--scripts/populate.in13
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/populate.in b/scripts/populate.in
index b9ee2d0..f68acd9 100644
--- a/scripts/populate.in
+++ b/scripts/populate.in
@@ -8,7 +8,6 @@ set -e
install="@@CT_install@@"
grep="@@CT_grep@@"
sed="@@CT_sed@@"
-sed_r="@@CT_sed_r@@"
awk="@@CT_awk@@"
# Detect where the toolchain is:
@@ -26,8 +25,8 @@ CT_CFG_SYSROOT_DIR="$("${CT_GCC}" -v 2>&1 \
|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;' \
+ |"${sed}" -r -e "s:^${CT_CFG_PREFIX_DIR}:${CT_PREFIX_DIR}:;" \
+ |"${sed}" -r -e 's,/+,/,g;' \
)"
myname=$(basename "$0")
@@ -200,7 +199,7 @@ do_add_lib() {
mkdir -p "${dir}"
true_libname=$("${CT_READELF}" -d "${libfile}" \
|"${grep}" "Library soname:" \
- |"${sed_r}" -e 's,.+\[(.+)\] *$,\1,;' \
+ |"${sed}" -r -e 's,.+\[(.+)\] *$,\1,;' \
)
case "${libfile}" in
*/ld*) mode=0755;;
@@ -227,7 +226,7 @@ do_resolve_deps() {
for libname in $("${CT_READELF}" -d "${file}" \
|"${grep}" -E '\(NEEDED\)[[:space:]]+Shared library:' \
- |"${sed_r}" -e 's,.+\[(.+)\] *$,\1,;' \
+ |"${sed}" -r -e 's,.+\[(.+)\] *$,\1,;' \
); do
[ -n "${libname}" ] || continue
${CT_PRINTF} "Searching for '%s' needed by '%s'\n" "${libname}" "${file}"
@@ -244,7 +243,7 @@ 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/#.*//;' \
+ lib_list=$("${sed}" -r -e ':loop; s/#.*//;' \
-e 's/[[:space:]]+//g;' \
-e 's/([^:])$/\1:/;' \
-e '/$/N; s/\n//; tloop;' \
@@ -252,7 +251,7 @@ if [ -n "${CT_LIB_FILE}" ]; then
)
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