Fix SOURCEDIR, BUILDDIR and similar when `cd` prints to stdout 85/18185/2
authorHenrique Ferreiro <hferreiro@igalia.com>
Fri, 23 Nov 2018 00:40:32 +0000 (01:40 +0100)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 23 Nov 2018 19:16:16 +0000 (19:16 +0000)
commitcae7cfb01c4e39a33ef3e851851632b4f0fd5db4
treed34d2c5ef123455d66f640ab5ed18d584984c10d
parent803f03daebb58b3a26462df35f001637f2ddf9a0
Fix SOURCEDIR, BUILDDIR and similar when `cd` prints to stdout

Several variables containing directories in `aglsetup.sh` and other
scripts use the common one-liner "cd $DIR && pwd -P" to resolve
symlinks. Unfortunately, in some cases, `cd` writes the new directory to
stdout, e.g. when using multiple search paths. This commit changes the
above to "cd $DIR > /dev/null && pwd -P" to make it more robust.

Change-Id: I150ecc9940d88738cf17add68290c35486a81a3b
Signed-off-by: Henrique Ferreiro <hferreiro@igalia.com>
scripts/.aglsetup_genconfig.bash
scripts/aglsetup.sh
scripts/envsetup.sh