summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-01-01 12:41:43 +0000
committerLeah Rowe <leah@libreboot.org>2024-01-01 12:41:43 +0000
commite6953dc4f0bbae746c536b7dd0b67bc5fa7bc253 (patch)
treed6ca54e39dbf5c8c19e4a80808c812e48289b087
parentd819403a0b8fbbfce03774141404d6ffe3feee0e (diff)
git.sh: clean up handling of tmp_git_dir
delete it once once, and delete it much sooner, right at the start of script/update/trees main() Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xinclude/git.sh4
-rwxr-xr-xinclude/option.sh1
-rwxr-xr-xscript/update/trees1
3 files changed, 2 insertions, 4 deletions
diff --git a/include/git.sh b/include/git.sh
index 1942a53b..519ae4d3 100755
--- a/include/git.sh
+++ b/include/git.sh
@@ -5,7 +5,6 @@
# This file is only used by update/project/trees
eval "$(setvars "" _target rev _xm loc url bkup_url depend patchfail)"
-tmp_git_dir="${PWD}/tmp/gitclone"
fetch_project_trees()
{
@@ -59,7 +58,6 @@ prepare_new_tree()
{
printf "Creating %s tree %s (%s)\n" "$project" "$tree" "$_target"
- remkdir "${tmp_git_dir%/*}"
cp -R "src/${project}/${project}" "${tmp_git_dir}" || \
err "prepare_new_tree ${project}/${tree}: can't make tmpclone"
git_patch "$tmp_git_dir" "$PWD/$cfgsdir/$tree/patches"
@@ -91,8 +89,6 @@ verify_config()
clone_project()
{
- remkdir "${tmp_git_dir%/}"
-
loc="${loc#src/}"
loc="src/${loc}"
if [ -d "${loc}" ]; then
diff --git a/include/option.sh b/include/option.sh
index 7c434444..66b89d4c 100755
--- a/include/option.sh
+++ b/include/option.sh
@@ -12,6 +12,7 @@ cbfstool="cbutils/default/cbfstool"
grubcfgsdir="config/grub"
layoutdir="/boot/grub/layouts"
. "${grubcfgsdir}/modules.list"
+tmp_git_dir="${PWD}/tmp/gitclone"
eval "$(setvars "" CONFIG_BOARD_DELL_E6400 CONFIG_HAVE_MRC CONFIG_HAVE_ME_BIN \
CONFIG_ME_BIN_PATH CONFIG_KBC1126_FIRMWARE CONFIG_KBC1126_FW1 \
diff --git a/script/update/trees b/script/update/trees
index 00ba83f1..fac37ccd 100755
--- a/script/update/trees
+++ b/script/update/trees
@@ -37,6 +37,7 @@ main()
elfdir="elf/${project}"
cfgsdir="config/${project}"
+ remkdir "${tmp_git_dir%/*}"
check_project
_cmd="build_projects"