[oe] content addressable fetching of packages, through MD5SUM or SHA1SUM?

Leon Woestenberg leon.woestenberg at gmail.com
Tue Mar 4 10:08:19 UTC 2008


As a quick proof-of-concept for the package crawler that builds a
table of URI's:

#!/bin/bash

# Requires links, sed, grep and Google :-)
# Given a file name as argument, Google's for alternative links
# @todo Add MD5SUM,SHA1SUM to check against, reject false URI's etc

FILE=$1

LIST=`links -dump
'http://www.google.com/search?q=intitle%3A%22index+of%22+'$FILE | grep
-e 'Cached' | sed 's@[ \t]*\(.*\)/[ ^t]\(.*\)@\1/@' | grep -v Cached`

for URI in $LIST
do
  echo -n $URI$FILE -
  wget --timeout=2 -t1 -O- $URI$FILE 2>/dev/null | md5sum
done




More information about the Openembedded-devel mailing list