2015-08-18 05:15:20 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# This fetches all google code source pages and reports those that have moved
|
|
|
|
# to github.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2015-08-27 19:01:41 +00:00
|
|
|
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"
|
|
|
|
|
|
|
|
echo "$all" | sort -u | shuf | while read url; do
|
2015-08-28 04:00:15 +00:00
|
|
|
printf "."
|
2015-08-18 05:15:20 +00:00
|
|
|
|
|
|
|
found=$(curl -s $url/checkout | sed -n 's/.*<A HREF="\(.*\)">here<\/A>.*/\1/p')
|
|
|
|
if [ -n "$found" ]; then
|
2015-08-28 04:00:15 +00:00
|
|
|
printf "\n%s\n" $url
|
2015-08-18 05:15:20 +00:00
|
|
|
printf "\tProject moved: %s\n" $found
|
|
|
|
fi
|
|
|
|
done
|