summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-07-13 20:01:39 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-07-13 20:02:09 +0100
commitc505064b2cea14c9da115a26e9326b9c0c7dca3b (patch)
tree758b24371fdd7b01e69f353dc73e7d383c133284 /bin
parent9027d53b2a00b3073f904cc3cb995e8953e41036 (diff)
downloadexternal_mesa3d-c505064b2cea14c9da115a26e9326b9c0c7dca3b.zip
external_mesa3d-c505064b2cea14c9da115a26e9326b9c0c7dca3b.tar.gz
external_mesa3d-c505064b2cea14c9da115a26e9326b9c0c7dca3b.tar.bz2
bugzilla_mesa.sh: sort the bugs list by number
v2: Use change sed/sort based on Ilia's suggestion. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bugzilla_mesa.sh13
1 files changed, 5 insertions, 8 deletions
diff --git a/bin/bugzilla_mesa.sh b/bin/bugzilla_mesa.sh
index 491ca0e..0cff426 100755
--- a/bin/bugzilla_mesa.sh
+++ b/bin/bugzilla_mesa.sh
@@ -15,17 +15,14 @@
# $ DRYRUN=yes bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | wc -l
-# regex pattern: trim before url
-trim_before='s/.*\(http\)/\1/'
+# regex pattern: trim before bug number
+trim_before='s/.*show_bug.cgi?id=\([0-9]*\).*/\1/'
-# regex pattern: trim after url
-trim_after='s/\(show_bug.cgi?id=[0-9]*\).*/\1/'
-
-# regex pattern: always use https
-use_https='s/http:/https:/'
+# regex pattern: reconstruct the url
+use_after='s,^,https://bugs.freedesktop.org/show_bug.cgi?id=,'
# extract fdo urls from commit log
-urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before -e $trim_after -e $use_https | sort | uniq)
+urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before | sort -n -u | sed -e $use_after)
# if DRYRUN is set to "yes", simply print the URLs and don't fetch the
# details from fdo bugzilla.