From 8d70839c020e2709dd96da54dcce56ab07f43a43 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Thu, 17 Dec 2015 16:13:12 +0000 Subject: [PATCH] A stab at fixing the make-cgit list script. --- .../make_pkgs_list/files/make-cgit-pkgs-list.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh b/roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh index 1686e568b2..8985ae1164 100644 --- a/roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh +++ b/roles/cgit/make_pkgs_list/files/make-cgit-pkgs-list.sh @@ -6,16 +6,17 @@ # Looking for git repos. # newfile=`mktemp` +target=/srv/git/repositories -ls > $newfile -cd /srv/git/repositories/ -for d in `ls`; do - if [ ! -L $d ] && [ -d $d ]; then - for f in `ls $d`; do - echo $d/$f >> $newfile; +ls $target > $newfile +for d in `ls $target`; do + if [ ! -L $target/$d ] && [ -d $target/$d ]; then + for f in `ls $target/$d/`; do + echo "$d/$f" >> $newfile; done; fi; done; + 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