-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathemail.sh
executable file
·54 lines (45 loc) · 1014 Bytes
/
email.sh
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
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
#
# ./email.sh [common] [-s]
# Get links for email.
# Does not do any changes.
#
# Details: works with latest developer.fedoraproject.org commit.
# Extracts all changed files (apart from filtered ones).
#
# For common options, see './common.sh -h'.
#
# -s output for staging branch
#
. $(dirname "`readlink -e "$0"`")/common.sh &>/dev/null || exit 1
U1='https://developer.'
U2='fedoraproject.org/'
stg=
ind=
c=0
br='origin/release'
[[ "$1" == '-s' ]] && {
stg='stg.'
br='origin/master'
ind=' '
shift
:
}
[[ -n "$1" ]] && {
br="$1"
shift
:
}
[[ -n "$br" ]] || die 'Branch missing.'
URL="$U1$stg$U2"
scd "$SITE"
git log --numstat -1 "$br" \
| grep '^[0-9]' \
| tr -s '\t' ' ' \
| cut -d' ' -f3 \
| grep -vE '^(js/index.json|sitemap.xml|deployment.html|start.html|tech.html|tools.html|css/main.css|index.html)$' \
| \
while read x; do
#let 'c+=1'
echo "${ind}[] ${URL}$x"
done