scripts/addToolVersion.sh
changeset 1174 7710d81d15e7
parent 1173 4b32ffb3f34d
child 1200 136731f6f597
     1.1 --- a/scripts/addToolVersion.sh	Thu Jan 29 18:48:05 2009 +0000
     1.2 +++ b/scripts/addToolVersion.sh	Thu Jan 29 18:53:32 2009 +0000
     1.3 @@ -1,8 +1,12 @@
     1.4  #!/bin/sh
     1.5 +set -e
     1.6  
     1.7  # Adds a new version to one of the toolchain component
     1.8  myname="$0"
     1.9  
    1.10 +# Parse the tools' paths configuration
    1.11 +. "paths.mk"
    1.12 +
    1.13  doHelp() {
    1.14      cat <<-EOF
    1.15  Usage: ${myname} <tool> <[options] version [...]> ...
    1.16 @@ -53,7 +57,7 @@
    1.17      local SedExpr1 SedExpr2
    1.18  
    1.19      file="config/${tool_prefix}/${tool}.in"
    1.20 -    v=$(echo "${version}" |sed -r -e 's/-/_/g; s/\./_/g;')
    1.21 +    v=$(echo "${version}" |"${sed}" -r -e 's/-/_/g; s/\./_/g;')
    1.22  
    1.23      SedExpr1="${SedExpr1}config ${cat}_V_${v}\n"
    1.24      SedExpr1="${SedExpr1}    bool\n"
    1.25 @@ -83,8 +87,8 @@
    1.26          fi
    1.27      fi
    1.28      SedExpr2="    default \"${version}\" if ${cat}_V_${v}"
    1.29 -    sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${SedExpr1}"'\n\1/;' "${file}"
    1.30 -    sed -r -i -e 's/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${SedExpr2}"'\n\1/;' "${file}"
    1.31 +    "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${SedExpr1}"'\n\1/;' "${file}"
    1.32 +    "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${SedExpr2}"'\n\1/;' "${file}"
    1.33  }
    1.34  
    1.35  cat=