File: updateConfig.sh

package info (click to toggle)
sofa-framework 1.0~beta4-12
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 88,828 kB
  • ctags: 27,300
  • sloc: cpp: 151,126; ansic: 2,387; xml: 581; sh: 417; makefile: 68
file content (30 lines) | stat: -rwxr-xr-x 836 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/bash
#define the directories were to apply the script
defaultDirectories=(framework modules applications extlibs)
#array containing the error, and the time for each scene
declare -a results
#counter of file touched
counter=0

#---------------------------------------------------------------------------
echo Touch files containing option \"$*\" inside ${defaultDirectories[@]}

for options in $*
do
    pattern="-e $options $pattern"
done

for dir in $(seq 0 $((${#defaultDirectories[@]} - 1)))
do

    echo "   "Searching in ${defaultDirectories[$dir]}
    result=$(rgrep $pattern ${defaultDirectories[$dir]} --include=*.h --include=*.inl --include=*.cpp -l)
    for file in $result
    do
        echo "      "found in $file
        touch $file
        counter=$(($counter+ 1))
    done
done

echo $counter files were touched