summaryrefslogtreecommitdiff
path: root/gen-installer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gen-installer.sh')
-rwxr-xr-xgen-installer.sh6
1 files changed, 4 insertions, 2 deletions
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"