FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 08-22-2012, 01:37 PM
Allan McRae
 
Default makepkg: check if hg and svn directories are non-empty before updating

Signed-off-by: Allan McRae <allan@archlinux.org>
---
scripts/makepkg.sh.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 21c660c..8ba4ff7 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"
--
1.7.12
 

Thread Tools




All times are GMT. The time now is 08:37 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org