File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -19,25 +19,17 @@ notice='########################################################################
19
19
# Run from the root of the project
20
20
cd $( dirname ${BASH_SOURCE[0]} ) /..
21
21
22
- # Set FIX=1 in the env to fix missing headers
23
- fix=${FIX:- " 0" }
24
-
25
22
# Function helper to check and optionally fix headers
26
23
function check_file {
27
24
fname=$1
28
25
second_line=$( cat $fname | head -n2 | tail -n1)
29
26
if [ " $second_line " != " # Copyright The Script It Authors" ]
30
27
then
31
- if [ " $fix " == " 1" ]
32
- then
33
- echo " Fixing missing copyright in $fname "
34
- file_content=$( cat $fname )
35
- echo " $notice " > $fname
36
- echo " $file_content " >> $fname
37
- else
38
- echo " Found missing copyright in $fname "
39
- return 1
40
- fi
28
+ echo " Fixing missing copyright in $fname "
29
+ file_content=$( cat $fname )
30
+ echo " $notice " > $fname
31
+ echo " $file_content " >> $fname
32
+ return 1
41
33
fi
42
34
}
43
35
@@ -46,9 +38,6 @@ for fname in $(find scriptit -name "*.py")
46
38
do
47
39
check_file $fname
48
40
file_exit_code=$?
49
- if [ " $file_exit_code " != " 0" ]
50
- then
51
- exit_code=$( expr " $exit_code " " +" " $file_exit_code " )
52
- fi
41
+ exit_code=$( expr " $exit_code " " +" " $file_exit_code " )
53
42
done
54
43
exit $exit_code
You can’t perform that action at this time.
0 commit comments