scripts: be POSIXly correct in helper scripts
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Nov 12 18:42:13 2009 +0100 (2009-11-12)
changeset 1623f935634ef900
parent 1622 9ad2a3fd1fcc
child 1624 782dea79ae56
scripts: be POSIXly correct in helper scripts

Fix helper scripts to be POSIXly correct: don't expect '.' (the dot
builtin) to search CWD if it is not in $PATH.
scripts/addToolVersion.sh
scripts/patch-renumber.sh
     1.1 --- a/scripts/addToolVersion.sh	Tue Nov 10 19:32:11 2009 +0100
     1.2 +++ b/scripts/addToolVersion.sh	Thu Nov 12 18:42:13 2009 +0100
     1.3 @@ -5,7 +5,12 @@
     1.4  myname="$0"
     1.5  
     1.6  # Parse the tools' paths configuration
     1.7 -. "paths.mk"
     1.8 +# It is expected that this script is only to be run from the
     1.9 +# source directory of crosstool-NG, so it is trivial to find
    1.10 +# paths.mk (we can't use  ". paths.mk", as POSIX states that
    1.11 +# $PATH should be searched for, and $PATH most probably doe
    1.12 +# not include "."), hence the "./".
    1.13 +. "./paths.mk"
    1.14  
    1.15  doHelp() {
    1.16      cat <<-EOF
     2.1 --- a/scripts/patch-renumber.sh	Tue Nov 10 19:32:11 2009 +0100
     2.2 +++ b/scripts/patch-renumber.sh	Thu Nov 12 18:42:13 2009 +0100
     2.3 @@ -5,7 +5,12 @@
     2.4  myname="$0"
     2.5  
     2.6  # Parse the tools' paths configuration
     2.7 -. "paths.mk"
     2.8 +# It is expected that this script is only to be run from the
     2.9 +# source directory of crosstool-NG, so it is trivial to find
    2.10 +# paths.mk (we can't use  ". paths.mk", as POSIX states that
    2.11 +# $PATH should be searched for, and $PATH most probably doe
    2.12 +# not include "."), hence the "./".
    2.13 +. "./paths.mk"
    2.14  
    2.15  doUsage() {
    2.16    cat <<_EOF_