File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright 2016 Rene Widera
2
+ #
3
+ # This file is part of PIConGPU.
4
+ #
5
+ # PIConGPU is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # PIConGPU is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with PIConGPU.
17
+ # If not, see <http://www.gnu.org/licenses/>.
18
+ #
19
+
20
+ # search recursive inside a folder if the keyword `__global__` is used
21
+ # @param $1 path to the folder
22
+ # @result 0 if keyword is not found else 1
23
+
24
+ folderName=$1
25
+ result=`grep -rn "__global__" $folderName`
26
+ if [ $? -eq 0 ] ; then
27
+ echo "Not allowed keyword __global__ found in the following files:" >&2
28
+ echo "$result" | cut -f1-2 -d":" >&2
29
+ exit 1
30
+ fi
31
+ exit 0
You can’t perform that action at this time.
0 commit comments