Blacklist pagure folders in dist-git to make cache building faster.

This commit is contained in:
Ralph Bean 2017-02-15 12:10:59 +00:00
parent 1db24ba991
commit 668b66570b

View file

@ -8,14 +8,21 @@
newfile=`mktemp`
target=/srv/git/repositories
# These are the pagure folders that we don't want to bother showing in cgit (it
# makes things too slow...)
blacklist='forks tickets docs requests'
for d in `ls $target`; do
if [ ! -L $target/$d ] && [ -d $target/$d ]; then
# If it's not a link, it is a directory, and it's not in the blacklist..
if [ ! -L $target/$d ] && [ -d $target/$d ] && [[ ! $blacklist == *"$d"* ]]; then
# Then take every file inside and stuff it into our tmpfile.
for f in `ls $target/$d/`; do
echo "$d/$f" >> $newfile;
done;
fi;
done;
# When we're done with everything in $target, make that avail to cgit.
mv -Z $newfile /srv/git/pkgs-git-repos-list
chown apache:apache /srv/git/pkgs-git-repos-list
chmod 644 /srv/git/pkgs-git-repos-list