@@ -3,66 +3,66 @@ FROM=v6.0.0
33
44pr_title ()
55{
6- local N=$1
7- curl --no-progress-meter https://github.com/universal-ctags/ctags/pull/" $N " | grep ' ^ <title>' | \
8- sed -e ' s!^[[:space:]]*<title>\(.\+Pull Request #[0-9]*\).*</title>$!* \1!' | \
9- sed -e " s/'/'/g" -e ' s/&/\&/g' -e ' s/"/"/g' -e ' s/>/>/g' -e ' s/</</g'
6+ local N=$1
7+ curl --no-progress-meter https://github.com/universal-ctags/ctags/pull/" $N " | grep ' ^ <title>' | \
8+ sed -e ' s!^[[:space:]]*<title>\(.\+Pull Request #[0-9]*\).*</title>$!* \1!' | \
9+ sed -e " s/'/'/g" -e ' s/&/\&/g' -e ' s/"/"/g' -e ' s/>/>/g' -e ' s/</</g'
1010}
1111
1212issue_title ()
1313{
14- local N=$1
15- curl --no-progress-meter https://github.com/universal-ctags/ctags/issues/" $N " | grep ' ^ <title>' | \
16- sed -e ' s!^[[:space:]]*<title>\(.\+Issue #[0-9]*\).*</title>$!* \1!' | \
17- sed -e " s/'/'/g" -e ' s/&/\&/g' -e ' s/"/"/g' -e ' s/>/>/g' -e ' s/</</g'
14+ local N=$1
15+ curl --no-progress-meter https://github.com/universal-ctags/ctags/issues/" $N " | grep ' ^ <title>' | \
16+ sed -e ' s!^[[:space:]]*<title>\(.\+Issue #[0-9]*\).*</title>$!* \1!' | \
17+ sed -e " s/'/'/g" -e ' s/&/\&/g' -e ' s/"/"/g' -e ' s/>/>/g' -e ' s/</</g'
1818}
1919
2020usage ()
2121{
22- printf " %s help|--help|-h\n" " $0 "
23- printf " %s pr [#]\n" " $0 "
24- printf " %s issue [#]\n" " $0 "
25- printf " %s man\n" " $0 "
22+ printf " %s help|--help|-h\n" " $0 "
23+ printf " %s pr [#]\n" " $0 "
24+ printf " %s issue [#]\n" " $0 "
25+ printf " %s man\n" " $0 "
2626}
2727
2828if [[ $# == 0 ]]; then
29- usage 1>&2
30- exit 1
29+ usage 1>&2
30+ exit 1
3131fi
3232
3333case $1 in
34- (help|--help|-h)
35- usage 1>&2
36- exit 0
37- ;;
38- (pr)
39- shift
40- if [[ $1 =~ [0-9]+ ]]; then
41- pr_title " $1 "
42- exit 0
43- else
44- git log --oneline ${FROM} .. \
45- | grep ' [0-9a-f]\+ Merge pull request #[0-9]\+.*' \
46- | sed -ne ' s/.*#\([0-9]\+\) from.*/\1/p' | while read N; do
47- pr_title " $N "
48- done
49- exit 0
50- fi
51- ;;
52- (issue)
53- shift
54- if [[ $1 =~ [0-9]+ ]]; then
55- issue_title " $1 "
56- exit 0
57- else
58- git log ${FROM} .. \
59- | grep ' Close #' \
60- | sed -ne ' s/[[:space:]]Close #\([0-9]\+\).*/\1/p' | while read N; do
61- issue_title $N
62- done
63- fi
64- ;;
65- (man)
66- git diff ${FROM} ... man/* .in
67- ;;
34+ (help|--help|-h)
35+ usage 1>&2
36+ exit 0
37+ ;;
38+ (pr)
39+ shift
40+ if [[ $1 =~ [0-9]+ ]]; then
41+ pr_title " $1 "
42+ exit 0
43+ else
44+ git log --oneline ${FROM} .. \
45+ | grep ' [0-9a-f]\+ Merge pull request #[0-9]\+.*' \
46+ | sed -ne ' s/.*#\([0-9]\+\) from.*/\1/p' | while read N; do
47+ pr_title " $N "
48+ done
49+ exit 0
50+ fi
51+ ;;
52+ (issue)
53+ shift
54+ if [[ $1 =~ [0-9]+ ]]; then
55+ issue_title " $1 "
56+ exit 0
57+ else
58+ git log ${FROM} .. \
59+ | grep ' Close #' \
60+ | sed -ne ' s/[[:space:]]Close #\([0-9]\+\).*/\1/p' | while read N; do
61+ issue_title $N
62+ done
63+ fi
64+ ;;
65+ (man)
66+ git diff ${FROM} ... man/* .in
67+ ;;
6868esac
0 commit comments