[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [repo-management] bin/anongit: Add cleanup bits to remove metadata
From:       Jeff Mitchell <mitchell () kde ! org>
Date:       2012-01-05 22:27:50
Message-ID: 20120105222750.C93C7A60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 86524fc79193778622c02a4a7075f65aca54bf43 by Jeff Mitchell.
Committed on 05/01/2012 at 23:57.
Pushed by mitchell into branch 'master'.

Add cleanup bits to remove metadata and dirs that don't exist

M  +7    -0    bin/anongit/create_anongit_metadata.sh

http://commits.kde.org/repo-management/86524fc79193778622c02a4a7075f65aca54=
bf43

diff --git a/bin/anongit/create_anongit_metadata.sh b/bin/anongit/create_an=
ongit_metadata.sh
index 77d90d3..4b3442e 100755
--- a/bin/anongit/create_anongit_metadata.sh
+++ b/bin/anongit/create_anongit_metadata.sh
@@ -1,6 +1,13 @@
 #!/bin/bash
 =

 # This creates the list of files to rsync down to the anon mirror. These f=
iles are metadata living in the various git repository directories.
+
+# First, clean out what's there
+cd ~git/metadata-tree
+for file in $( find -type f ); do if [ ! -e /srv/kdegit/repositories/$file=
 ]; then rm $file; fi; done
+for dir in $( find -type d ); do if [ -z "$(ls -A $dir)" ]; then rmdir $di=
r; fi; done
+
+# Now actually do the list
 cd ~git
 cp projects.list projects-list/projects-to-anongit.list
 chmod 755 projects-list/projects-to-anongit.list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic