summaryrefslogtreecommitdiff
path: root/scripts/saveSample.sh.in
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-02-13 02:53:23 (GMT)
committerAlexey Neyman <stilor@att.net>2017-02-14 06:47:40 (GMT)
commit7bcf18bfab84374d3305c7a088f95ac1219ddf93 (patch)
tree49c67ed5fb9729ef554c3a07a916612af5139e24 /scripts/saveSample.sh.in
parentfbc69323085e2370faeb8b46291cd66cbf9ef649 (diff)
Determine whether -E/-r option selects extended regexp
... and then use the right option. See the note in scripts/functions on where we should use ${foo} and where just 'foo'; this boils down to whether we can expect the build tools override to be in effect (e.g. in the actual build scripts) or not (i.e. outside of scripts/build). While running in scripts/functions, or in scripts/crosstool-NG.sh the build tools override directory (.build/tools/bin) may have not been set up (yet, or at all). Also, modify the installed scripts (populate, xldd) accordingly. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/saveSample.sh.in')
-rw-r--r--scripts/saveSample.sh.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in
index 646c189..3160d26 100644
--- a/scripts/saveSample.sh.in
+++ b/scripts/saveSample.sh.in
@@ -50,7 +50,7 @@ force_default_opts=( \
)
regexp=${force_default_opts[*]}
regexp=${regexp// /|}
-grep -v -E '^(# )?CT_('"${regexp}"')' .config > .defconfig
+${grep} -v -E '^(# )?CT_('"${regexp}"')' .config > .defconfig
# Function to copy a file to the sample directory
# Needed in case the file is already there (think of a previously available sample)
@@ -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
@@ -98,7 +98,7 @@ read -p "Reporter name [${reporter_name}]: " reporter_name
read -p "Reporter URL [${reporter_url}]: " reporter_url
if [ -n "${reporter_comment}" ]; then
echo "Old comment:"
- printf "${reporter_comment}\n" | ${sed} -r -e 's/^/ > /;'
+ printf "${reporter_comment}\n" | ${sed_r} -e 's/^/ > /;'
fi
echo "Reporter comment (Ctrl-D to finish, '.' to use previous):"
reporter_comment=$(cat)