Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0540296e authored by Steven Moreland's avatar Steven Moreland
Browse files

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
parent b0f46777
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ function build_build_var_cache()
    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_ \