[projects/git-slug: 141/170] adc/trash: remove spec files from SPECS directory

glen glen at pld-linux.org
Mon Sep 21 21:50:39 CEST 2015


commit f17a9f0486b5353b8e2888cbc47555aa5b78d5f0
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Sat Jul 14 18:19:33 2012 +0100

    adc/trash: remove spec files from SPECS directory

 adc/trash | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/adc/trash b/adc/trash
index 5fdcde8..58cf14e 100755
--- a/adc/trash
+++ b/adc/trash
@@ -29,4 +29,13 @@ echo "Repository removed by $GL_USER" > $repofull/.gitolite.down
   GIT_DIR=$repofull git for-each-ref  --format="%(objectname) $EMPTYSHA1 %(refname)" refs/heads/\*
   ) > "$WATCHDIR/$1.$$"
 
+SPECSDIR=$(git config hooks.specsdir)
+[ -n "${SPECSDIR%%/*}" ] &&  SPECSDIR="$HOME/$SPECSDIR"
+if [ -d $SPECSDIR ]; then
+    git --git-dir="$repofull" ls-tree --name-only -r refs/heads/master | grep '\.spec$' |\
+        xargs -I file rm "$SPECSDIR/file"
+else
+    echo "SPECSDIR $SPECSDIR is missing"
+fi
+
 mv $repofull $newdir/$ATTIC_SUFFIX
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list