diff options
author | Leah Rowe <leah@libreboot.org> | 2024-07-17 18:39:42 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-07-17 18:39:42 +0100 |
commit | 79f50b3791566852a909eb30d39c98df493d312e (patch) | |
tree | d403f1e9b69fd2fa0e48217360f3c15368ca7ea7 /include/git.sh | |
parent | a9f9de885c07541934ecad56ea6c7126f05a89be (diff) |
unify caching of files into cache/
hash/ becomes cache/hash/
repo/ becomes cache/repo/
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/git.sh')
-rw-r--r-- | include/git.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/git.sh b/include/git.sh index 44afd487..2eea5137 100644 --- a/include/git.sh +++ b/include/git.sh @@ -37,7 +37,8 @@ fetch_project() clone_project() { - loc="repo/$project" && singletree "$project" && loc="src/$project" + loc="cache/repo/$project" && singletree "$project" && \ + loc="src/$project" printf "Downloading project '%s' to '%s'\n" "$project" "$loc" e "$loc" d && return 0 @@ -61,7 +62,7 @@ git_prep() [ "$project" = "coreboot" ] && [ -n "$xtree" ] && [ $# -gt 2 ] && \ [ "$xtree" != "$tree" ] && link_crossgcc "$_loc" - [ "$XBMK_RELEASE" = "y" ] && [ "$_loc" != "repo/$project" ] \ + [ "$XBMK_RELEASE" = "y" ] && [ "$_loc" != "cache/repo/$project" ] \ && rmgit "$tmpgit" move_repo "$_loc" @@ -101,8 +102,8 @@ fetch_submodule() tmpclone() { [ $# -lt 6 ] || rm -Rf "$3" || $err "git retry: !rm $3 ($1)" - repodir="repo/${1##*/}" && [ $# -gt 5 ] && repodir="$3" - x_ mkdir -p "repo" + repodir="cache/repo/${1##*/}" && [ $# -gt 5 ] && repodir="$3" + x_ mkdir -p "cache/repo" if [ -d "$repodir" ] && [ $# -lt 6 ]; then git -C "$repodir" pull || sleep 3 || git -C "$repodir" pull \ || sleep 3 || git -C "$repodir" pull : |