5 echo
"$(basename $0) [-h] -t <modules|authors|code|this_year> <directory list>"
6 echo
" search the listed directories for information"
9 # Determine command options (just -h for help)
15 * ) echo
"ERROR: Unknown option" ;
usage ;
exit 1 ;;
23 echo 'ERROR: no type specified'
28 # can we find the code?
30 echo "ERROR: Please specify
a list of directories
"
35 for REP in ${directory_list}
37 if [ ! -d ${REP} ]; then
41 if [ ! -d ${REP}/.git ]; then
42 echo "ERROR: cannot find ${REP}/.git
"
46 ##echo "will search ${REP}
for ${
type}
"
51 ##echo "we
are here: ${thisdir}
"
52 if [ "${
type}
" = "modules
" ]; then
53 for REP in ${directory_list}; do
54 listm=`find ${REP} -name "*_*.cc
" | grep -v test`
55 module_list=`echo ${module_list} ${listm}`
57 num_mod=`echo ${module_list} | wc -w`
59 echo "found ${num_mod} modules
"
60 elif [ "${
type}
" = "authors
" ]; then
61 for REP in ${directory_list}; do
63 lista=`git log --all --format='"%cN
"' | sort -u`
64 author_list=`echo ${author_list} ${lista}`
69 elif [ "${
type}
" = "code
" ]; then
70 if [[ `type cloc` ]]; then
72 cloc --exclude-dir=ups ${directory_list}
74 echo "ERROR: cannot find
the cloc utilitiy
"
77 elif [ "${
type}
" = "this_year
" ]; then
78 for REP in ${directory_list}; do
80 listy=`git log --pretty='' --numstat --since 1.year origin/master | grep -v '-' | grep -v ups | cut -f 1 | paste -sd+ - | bc`
82 echo "${REP}: ${listy} lines changed
in the last year
"
process_name standard_reco_uboone fcl
process_name opflash particleana ie ie ie z
then if[["$THISISATEST"==1]]
*usage exit esac done shift expr $OPTIND OPTIND
esac done echo Signal files are
return match has_match and(match.match_pdg==11 or match.match_pdg==-11)
then echo Work directory not specified exit fi echo Work directory
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in