git.sh: remove previous tmprepo if args>5
if doing a retry, the directory may still exist, which would make git clone yield an error response; the existing directory will have been the one that failed to reset, so let's delete it. the one deleted is not the cache (repo/PROJECT/), thus otherwise maintaining current behaviour. Signed-off-by: Leah Rowe <leah@libreboot.org>audit2
parent
3e2e5ecf5a
commit
0d55d7b23a
|
@ -100,6 +100,7 @@ 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"
|
||||
if [ -d "$repodir" ] && [ $# -lt 6 ]; then
|
||||
|
|
Loading…
Reference in New Issue