git.sh: don't download to src/project/project/
re-use repo/project/ this means that single- and multi-tree projects now have a unified cached git repo location, as per the new rules, thus saving on disk space usage. Signed-off-by: Leah Rowe <leah@libreboot.org>audit2
parent
3590a53ed1
commit
c44ff5ac47
|
@ -13,7 +13,7 @@ fetch_targets()
|
||||||
|
|
||||||
printf "Creating %s tree %s\n" "$project" "$tree"
|
printf "Creating %s tree %s\n" "$project" "$tree"
|
||||||
git_prep "$loc" "$loc" "$PWD/$configdir/$tree/patches" \
|
git_prep "$loc" "$loc" "$PWD/$configdir/$tree/patches" \
|
||||||
"${loc%/*}/$tree" u; nuke "$project/$tree" "$project/$tree"
|
"src/$project/$tree" u; nuke "$project/$tree" "$project/$tree"
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch_project()
|
fetch_project()
|
||||||
|
@ -37,7 +37,7 @@ fetch_project()
|
||||||
|
|
||||||
clone_project()
|
clone_project()
|
||||||
{
|
{
|
||||||
loc="src/$project/$project" && singletree "$project" && loc="${loc%/*}"
|
loc="repo/$project" && singletree "$project" && loc="src/$project"
|
||||||
|
|
||||||
printf "Downloading project '%s' to '%s'\n" "$project" "$loc"
|
printf "Downloading project '%s' to '%s'\n" "$project" "$loc"
|
||||||
e "$loc" d && return 0
|
e "$loc" d && return 0
|
||||||
|
@ -61,7 +61,7 @@ git_prep()
|
||||||
[ "$project" = "coreboot" ] && [ -n "$xtree" ] && [ $# -gt 2 ] && \
|
[ "$project" = "coreboot" ] && [ -n "$xtree" ] && [ $# -gt 2 ] && \
|
||||||
[ "$xtree" != "$tree" ] && link_crossgcc "$_loc"
|
[ "$xtree" != "$tree" ] && link_crossgcc "$_loc"
|
||||||
|
|
||||||
[ "$XBMK_RELEASE" = "y" ] && [ "$_loc" != "src/$project/$project" ] \
|
[ "$XBMK_RELEASE" = "y" ] && [ "$_loc" != "repo/$project" ] \
|
||||||
&& rmgit "$tmpgit"
|
&& rmgit "$tmpgit"
|
||||||
|
|
||||||
move_repo "$_loc"
|
move_repo "$_loc"
|
||||||
|
|
Loading…
Reference in New Issue