envsetup.sh: don't assume 'cd' is builtin
Some parts of envsetup.sh aren't very happy with things like
this:
function cd() {
builtin cd "$@" && pwd && ls -l
}
here, I have s/cd/builtin cd/ one such case where envsetup
is trying to execute the output of cd.
Test: manual
Change-Id: I2774481dfbd958410682a4f773f1b8f12a0080aa
diff --git a/envsetup.sh b/envsetup.sh
index 394df65..fe22111 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -51,7 +51,7 @@
cached_vars=`cat $T/build/envsetup.sh | tr '()' ' ' | awk '{for(i=1;i<=NF;i++) if($i~/get_build_var/) print $(i+1)}' | sort -u | tr '\n' ' '`
cached_abs_vars=`cat $T/build/envsetup.sh | tr '()' ' ' | awk '{for(i=1;i<=NF;i++) if($i~/get_abs_build_var/) print $(i+1)}' | sort -u | tr '\n' ' '`
# Call the build system to dump the "<val>=<value>" pairs as a shell script.
- build_dicts_script=`\cd $T; build/soong/soong_ui.bash --dumpvars-mode \
+ build_dicts_script=`\builtin cd $T; build/soong/soong_ui.bash --dumpvars-mode \
--vars="$cached_vars" \
--abs-vars="$cached_abs_vars" \
--var-prefix=var_cache_ \