-
-
Notifications
You must be signed in to change notification settings - Fork 261
Expand file tree
/
Copy pathcheck-headers.sh
More file actions
41 lines (30 loc) · 936 Bytes
/
check-headers.sh
File metadata and controls
41 lines (30 loc) · 936 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
if [ -z "$*" ]
then
exit 0
fi
grep -L '^# Copyright (C) [0-9-]*, Python Software Foundation' $* | while read -r file
do
echo "Please update the po comment in $file"
done
grep -L '^"Project-Id-Version: Python 3\\n"$' $* | while read -r file
do
cat <<EOF
Please update the 'Project-Id-Version' header in $file using:
sed -i 's/^"Project-Id-Version:.*"$/"Project-Id-Version: Python 3\\\\n"/' $file
EOF
done
grep -L '^"Language: fr\\n"$' $* | while read -r file
do
cat <<EOF
Please update the 'Language' header in $file using:
sed -i 's/^.Language-Team.*/\\0\\n"Language: fr\\\\n"/' $file
EOF
done
grep -L '^"Language-Team: FRENCH <traductions@lists.afpy.org>\\n"' $* | while read -r file
do
cat <<EOF
Please update the 'Language-Team' header in $file using:
sed -i 's/"Language-Team: LANGUAGE <LL@li.org>\\\\n"/"Language-Team: FRENCH <traductions@lists.afpy.org>\\\\n"/' $file
EOF
done