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