diff options
author | Brian Anderson <banderson@mozilla.com> | 2015-04-22 10:50:33 -0700 |
---|---|---|
committer | Brian Anderson <banderson@mozilla.com> | 2015-04-22 10:51:02 -0700 |
commit | e54d4823d26cdb3f98e5a1b17e1c257cd329aa61 (patch) | |
tree | f97c32a558869fada5c20260bb3cdd1ad0c98403 | |
parent | 47fbf56ec1d01b359138664ec7e7634c1013b37d (diff) | |
download | rust-installer-e54d4823d26cdb3f98e5a1b17e1c257cd329aa61.tar.gz |
Also route cd to /dev/null
-rwxr-xr-x | combine-installers.sh | 5 | ||||
-rwxr-xr-x | gen-install-script.sh | 5 | ||||
-rwxr-xr-x | gen-installer.sh | 6 | ||||
-rw-r--r-- | install-template.sh | 5 | ||||
-rwxr-xr-x | test.sh | 5 |
5 files changed, 16 insertions, 10 deletions
diff --git a/combine-installers.sh b/combine-installers.sh index 29a05c3..fd2d71e 100755 --- a/combine-installers.sh +++ b/combine-installers.sh @@ -202,8 +202,9 @@ validate_opt () { abs_path() { local path="$1" # Unset CDPATH because it causes havok: it makes the destination unpredictable - # and triggers 'cd' to print the path to stdout. - (unset CDPATH && cd "$path" && pwd) + # and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null + # for good measure. + (unset CDPATH && cd "$path" > /dev/null && pwd) } msg "looking for programs" diff --git a/gen-install-script.sh b/gen-install-script.sh index 2b1e34c..620fcf7 100755 --- a/gen-install-script.sh +++ b/gen-install-script.sh @@ -208,8 +208,9 @@ validate_opt () { abs_path() { local path="$1" # Unset CDPATH because it causes havok: it makes the destination unpredictable - # and triggers 'cd' to print the path to stdout. - (unset CDPATH && cd "$path" && pwd) + # and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null + # for good measure. + (unset CDPATH && cd "$path" > /dev/null && pwd) } msg "looking for install programs" diff --git a/gen-installer.sh b/gen-installer.sh index 8c8cc7d..9f2b1f6 100755 --- a/gen-installer.sh +++ b/gen-installer.sh @@ -204,11 +204,13 @@ validate_opt () { done } +# Prints the absolute path of a directory to stdout abs_path() { local path="$1" # Unset CDPATH because it causes havok: it makes the destination unpredictable - # and triggers 'cd' to print the path to stdout. - (unset CDPATH && cd "$path" && pwd) + # and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null + # for good measure. + (unset CDPATH && cd "$path" > /dev/null && pwd) } msg "looking for programs" diff --git a/install-template.sh b/install-template.sh index 6f81183..042b955 100644 --- a/install-template.sh +++ b/install-template.sh @@ -314,8 +314,9 @@ absolutify() { abs_path() { local path="$1" # Unset CDPATH because it causes havok: it makes the destination unpredictable - # and triggers 'cd' to print the path to stdout. - (unset CDPATH && cd "$path" && pwd) + # and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null + # for good measure. + (unset CDPATH && cd "$path" > /dev/null && pwd) } get_host_triple() { @@ -12,8 +12,9 @@ fi abs_path() { local path="$1" # Unset CDPATH because it causes havok: it makes the destination unpredictable - # and triggers 'cd' to print the path to stdout. - (unset CDPATH && cd "$path" && pwd) + # and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null + # for good measure. + (unset CDPATH && cd "$path" > /dev/null && pwd) } S="$(abs_path $(dirname $0))" |