summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xupdate-sources6
1 files changed, 4 insertions, 2 deletions
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%%: *}"