From: thierry Date: Mon, 21 Apr 2008 12:24:33 +0000 (+0000) Subject: minor improvements X-Git-Tag: foo~340 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0b3357b18c8f9dddf6922a0e516fb3987be8ad6b;p=infrastructure.git minor improvements --- diff --git a/scripts/svn-keywords.sh b/scripts/svn-keywords.sh index d5351bc..ee96bc0 100755 --- a/scripts/svn-keywords.sh +++ b/scripts/svn-keywords.sh @@ -63,14 +63,25 @@ function run_keywords () { cd $dir echo "xxxxxxxxxxxxxxxxxxxx Fixing keywords props in $(pwd)" echo -n "xxxxxxxxxx Gathering files under subversion " - svnfiles=$(svn list -R) - echo $(ls -1 $svnfiles | wc -l) files found + svnfiles=$(svn list -R | grep -v '/$') + # handle this, as otherwise grep hangs on stdin + if [ -z "$svnfiles" ] ; then + echo "xxxxx Nothing applicable in $dir - skipping" + continue + fi + + echo $(ls -1 $svnfiles | wc -l) files found + for keyword in $keywords ; do files=$(grep -l '$'"$keyword" $svnfiles) + if [ -z "$files" ] ; then + echo "xxxxx No file found with \$$keyword" + continue + fi nbfiles=$(ls -1 $files | wc -l) - echo Found $nbfiles with \$$keyword + echo "xxxxx Found" $nbfiles "with \$$keyword" for file in $files ; do run_keyword_on_file $keyword $file