From 6adbf2645b4e6c58837c36d62d8c830456533e73 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 31 Aug 2021 19:58:04 +0200 Subject: update-sources: remove repositoriy if update fails --- update-sources | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'update-sources') diff --git a/update-sources b/update-sources index 1b4e98daf..2a0aa41ca 100755 --- a/update-sources +++ b/update-sources @@ -31,11 +31,13 @@ elif [ $# -eq 1 ]; then case "${1%%: *}" in 'git') - git -C "${1#*: }" fetch --all -p + git -C "${1#*: }" fetch --all -p \ + || rm -rf --one-file-system "${1#*: }" ;; 'svn') cd "${1#*: }" - svn update + svn update \ + || rm -rf --one-file-system "${1#*: }" ;; *) >&2 printf '%s: unknown VCS "%s"\n' "$0" "${1%%: *}" -- cgit v1.2.3-54-g00ecf