From 62c28b1eb02a7b8c15699f1885cb0fc9fbb1a59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 17 Aug 2015 22:15:20 -0700 Subject: [PATCH] Add script to detect projects that moved from google code to github --- tools/google-code-moved.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tools/google-code-moved.sh diff --git a/tools/google-code-moved.sh b/tools/google-code-moved.sh new file mode 100755 index 0000000000..3c4d4562a7 --- /dev/null +++ b/tools/google-code-moved.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# This fetches all google code source pages and reports those that have moved +# to github. + +set -e + +sed -n 's@Source Code:\(.*code\.google\.com.*/source\)@\1@p' metadata/*.txt | sort -u | while read url; do + echo $url + + found=$(curl -s $url/checkout | sed -n 's/.*here<\/A>.*/\1/p') + if [ -n "$found" ]; then + printf "\tProject moved: %s\n" $found + fi +done