tools/rgit2hg.sh
changeset 11519 5d804405964d
parent 10649 d83897fed816
child 11522 b3ee79e8e3b9
--- a/tools/rgit2hg.sh	Fri Jan 15 13:29:27 2016 +0100
+++ b/tools/rgit2hg.sh	Sat Jan 16 19:11:21 2016 +0100
@@ -26,7 +26,7 @@
     echo "Checking $url ..."
     echo
     page=$(wget -q -O- "$url")
-    author=$(echo "$page" | sed -rn 's/^.*"author-name">(<[^>]*>)*([^ <]*).*/\2/ p')
+    author=$(echo "$page" | sed -rn '1,/"user-mention"/{s/^.*"user-mention"( *[^>]*)?> *([^ <]*).*$/\2/ p}')
     if [ -z "$author" ]; then
         echo 'Couldn'\''t find author! Skipping '"$1"' ...' >&2
         shift
@@ -51,7 +51,7 @@
     fi
     rev=$(echo "$result" | sed 's/^.*://;q')
     echo 'Found match: r'"$rev"
-    echo 'Link:        https://code.google.com/p/hedgewars/source/detail?r='"$rev"
+    echo 'Link:        http://hg.hedgewars.org/hedgewars/rev/'"$rev"
     echo
     echo "$result"
     # proceed to next parameter