[projects/git-slug: 90/170] Fix check if dir in Attic already exist

glen glen at pld-linux.org
Mon Sep 21 21:46:22 CEST 2015


commit 09bd8c23f02732ff3973ec453eb8f179e13d81e1
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Tue Mar 13 15:47:17 2012 +0000

    Fix check if dir in Attic already exist
    
    Repo contains full path so we should check for presence of its base name.

 trash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/trash b/trash
index b716c77..3dda75a 100755
--- a/trash
+++ b/trash
@@ -16,7 +16,7 @@ repo=$GL_REPO_BASE_ABS/packages/$1.git
 
 [ -d $repo ] || die "Error: repository $repo does'nt exist"
 [ -d $ATTIC ] || die "Error: Directory $ATTIC does not exist"
-[ -e $ATTIC/$repo ] && die "Error: Directory $ATTIC/abra already exist"
+[ -e $ATTIC/`basename $repo` ] && die "Error: Directory $ATTIC/repo already exist"
 echo "Repository removed by $GL_USER" > $repo/.gitolite.down
 
 ( echo $GL_USER
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5



More information about the pld-cvs-commit mailing list