From d0ba17bb6f0871bfea3c6fb4e99df49d0e66eeb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 7 Mar 2016 22:31:55 +0000 Subject: [PATCH] Remove now broken google-code-moved script I wrote this nearly a year ago, and it's recently been broken by the new redirect that Google Code does. A few dozen apps were fixed thanks to this, so it did its job. If any devs still on Google Code after all this time want to update their metadata, they can. --- tools/google-code-moved.sh | 43 -------------------------------------- 1 file changed, 43 deletions(-) delete mode 100755 tools/google-code-moved.sh diff --git a/tools/google-code-moved.sh b/tools/google-code-moved.sh deleted file mode 100755 index db32bf8d0f..0000000000 --- a/tools/google-code-moved.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# This fetches all google code source pages and reports those that have moved -# to github. - -set -e - -all=$(sed -n 's@Source Code:\(.*code\.google\.com.*/source\)@\1@p' metadata/*.txt | sort -u) -len=$(echo "$all" | wc -l) - -echo "$len apps left" - -moved() { - if echo $2 | grep -q accounts/ServiceLogin; then - return - fi - printf "\n%s\n" $1 - printf "\tProject moved: %s\n" $2 -} - -echo "$all" | sort -u | shuf | while read url; do - printf "." - - redurl=$(curl -s -I $url/checkout | perl -n -e '/^Location: (.*)$/ && print "$1\n"') - - if echo $redurl | grep -q hosting/moved; then - found=$(curl -L -s $url/checkout | sed -n 's/.*View the project at: .*/\1/p') - moved $url $found - continue - fi - if [ -n "$redurl" ] && [ "$redurl" != "$url" ]; then - moved $url $redurl - continue - fi - - found=$(curl -L -s $url/checkout | sed -n 's/.*here<\/A>.*/\1/p') - if [ -n "$found" ]; then - moved $url $found - continue - fi -done - -echo