equal
deleted
inserted
replaced
24 echo '---------------------------------------------------------------' |
24 echo '---------------------------------------------------------------' |
25 url="https://github.com/hedgewars/hw/commit/$1" |
25 url="https://github.com/hedgewars/hw/commit/$1" |
26 echo "Checking $url ..." |
26 echo "Checking $url ..." |
27 echo |
27 echo |
28 page=$(wget -q -O- "$url") |
28 page=$(wget -q -O- "$url") |
29 author=$(echo "$page" | sed -rn 's/^.*"author-name">(<[^>]*>)*([^ <]*).*/\2/ p') |
29 author=$(echo "$page" | sed -rn '1,/"user-mention"/{s/^.*"user-mention"( *[^>]*)?> *([^ <]*).*$/\2/ p}') |
30 if [ -z "$author" ]; then |
30 if [ -z "$author" ]; then |
31 echo 'Couldn'\''t find author! Skipping '"$1"' ...' >&2 |
31 echo 'Couldn'\''t find author! Skipping '"$1"' ...' >&2 |
32 shift |
32 shift |
33 continue |
33 continue |
34 fi |
34 fi |
49 shift |
49 shift |
50 continue |
50 continue |
51 fi |
51 fi |
52 rev=$(echo "$result" | sed 's/^.*://;q') |
52 rev=$(echo "$result" | sed 's/^.*://;q') |
53 echo 'Found match: r'"$rev" |
53 echo 'Found match: r'"$rev" |
54 echo 'Link: https://code.google.com/p/hedgewars/source/detail?r='"$rev" |
54 echo 'Link: http://hg.hedgewars.org/hedgewars/rev/'"$rev" |
55 echo |
55 echo |
56 echo "$result" |
56 echo "$result" |
57 # proceed to next parameter |
57 # proceed to next parameter |
58 shift |
58 shift |
59 done |
59 done |