From 2d347132ba0f92a37edad5159a36803915c1caf0 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 22 Aug 2012 23:35:17 +1000 Subject: makepkg: check if hg and svn directories are non-empty before updating Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 21c660c0..8ba4ff7b 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -475,7 +475,7 @@ download_hg() { url=${url##*hg+} url=${url%%#*} - if [[ ! -d "$dir" ]]; then + if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "hg" if ! hg clone -U "$url" "$dir"; then error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "hg" @@ -537,7 +537,7 @@ download_svn() { fi url=${url%%#*} - if [[ ! -d "$dir" ]]; then + if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "svn" if ! svn checkout --config-dir "$dir" "$url" "$dir"; then error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "svn" -- cgit v1.2.3-24-g4f1b