#!/bin/bash
-# $Id$
-# $URL$
COMMAND=$(basename $0)
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