summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-08-22 23:35:17 +1000
committerDan McGee <dan@archlinux.org>2012-09-18 08:40:08 -0500
commit2d347132ba0f92a37edad5159a36803915c1caf0 (patch)
tree437e699046eeaa31c6052546f71699ec0832fa6f /scripts
parent800799ea63a4e5b48b320fbb55267a4c522b8e9a (diff)
downloadpacman-2d347132ba0f92a37edad5159a36803915c1caf0.tar.xz
makepkg: check if hg and svn directories are non-empty before updating
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in4
1 files changed, 2 insertions, 2 deletions
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"