summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-01-29 18:53:32 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-01-29 18:53:32 (GMT)
commit1b05494c839ec135c6f69d3baa00afea4de33111 (patch)
tree1b78bf2d2c3825696d6432ee38ff8d4852334b87 /scripts
parentfcd59328f48393c592eea8918bceec658d3874fd (diff)
Use the path discovered by ./configure in scripts/addToolVersion.sh
It now requires that "./configure && make" be run beforehand. /trunk/scripts/addToolVersion.sh | 10 7 3 0 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/addToolVersion.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh
index 30c3f63..d0a76c6 100755
--- a/scripts/addToolVersion.sh
+++ b/scripts/addToolVersion.sh
@@ -1,8 +1,12 @@
#!/bin/sh
+set -e
# Adds a new version to one of the toolchain component
myname="$0"
+# Parse the tools' paths configuration
+. "paths.mk"
+
doHelp() {
cat <<-EOF
Usage: ${myname} <tool> <[options] version [...]> ...
@@ -53,7 +57,7 @@ addToolVersion() {
local SedExpr1 SedExpr2
file="config/${tool_prefix}/${tool}.in"
- v=$(echo "${version}" |sed -r -e 's/-/_/g; s/\./_/g;')
+ v=$(echo "${version}" |"${sed}" -r -e 's/-/_/g; s/\./_/g;')
SedExpr1="${SedExpr1}config ${cat}_V_${v}\n"
SedExpr1="${SedExpr1} bool\n"
@@ -83,8 +87,8 @@ addToolVersion() {
fi
fi
SedExpr2=" default \"${version}\" if ${cat}_V_${v}"
- sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${SedExpr1}"'\n\1/;' "${file}"
- sed -r -i -e 's/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${SedExpr2}"'\n\1/;' "${file}"
+ "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${SedExpr1}"'\n\1/;' "${file}"
+ "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${SedExpr2}"'\n\1/;' "${file}"
}
cat=