2 ## SPDX-License-Identifier: BSD-3-Clause
4 # This script allows us to capture all the commands run in the shell by the
5 # coreboot build. This is better than using 'make v=1' because it captures
6 # commands right from the beginning of the build, and sends the output of any
7 # command to the interactive shell.
10 # make SHELL="${PWD}/util/scripts/capture_commands.sh"
12 REALSHELL
=${REALSHELL:-sh}
13 OUTPUT_DIR
=${TOP:-/tmp}
14 CAPTURE_FILE
=${CAPTURE_FILE:-commands.txt}
16 env
echo "$*" |
sed 's/^-c '// >> "${OUTPUT_DIR}/${CAPTURE_FILE}"