From 93a574b2bc1cc2f252285ac7c569ee27700c4262 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 12 Apr 2023 11:37:10 -0400 Subject: [PATCH] Run init command each time compile command is executed Running init command only once before the temporary git branch is created can create an invalid configuration file. --- scripts/kernel-send-patches.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/kernel-send-patches.sh b/scripts/kernel-send-patches.sh index 28af710..07c725e 100755 --- a/scripts/kernel-send-patches.sh +++ b/scripts/kernel-send-patches.sh @@ -214,10 +214,6 @@ rm -rf ${srcdir}/*.patch # If the cover letter is not between start and end commits, save a copy: cp ${srcdir}/cover-letter.txt /tmp -if [ x"${init_cmd}" != x"" ]; then - ${init_cmd} -fi - patches_branch="kernel_send_patches" if [ x"${series}" != x"" ]; then @@ -287,9 +283,13 @@ cat > ${compile_script} << "EOF" # Do not edit, auto-generated script echo echo "Testing commit: $(git log --oneline | head -n 1)" +#INIT_CMD COMPILE_CMD EOF +if [ x"${init_cmd}" != x"" ]; then + sed -i -e "s@.*INIT_CMD@${init_cmd}@" ${compile_script} +fi sed -i -e "s@COMPILE_CMD@${compile_cmd}@" ${compile_script} chmod u+x ${compile_script} -- 2.20.1