swap tabs to spaces

This commit is contained in:
Steve McIntyre 2008-07-06 21:08:21 +00:00
parent 03305d23f2
commit fe768847b1
1 changed files with 50 additions and 50 deletions

View File

@ -16,61 +16,61 @@ OUT=$5
for ARCH in $ARCHES for ARCH in $ARCHES
do do
LOCATIONS="$MIRROR/dists/$CODENAME/ $MIRROR/dists/$DI_CODENAME/" LOCATIONS="$MIRROR/dists/$CODENAME/ $MIRROR/dists/$DI_CODENAME/"
echo "Looking in $LOCATIONS" echo "Looking in $LOCATIONS"
case $ARCH in case $ARCH in
source) source)
FILES=`find $LOCATIONS -name Sources.gz` FILES=`find $LOCATIONS -name Sources.gz`
echo "Using MD5 sums from Sources files:" echo "Using MD5 sums from Sources files:"
echo $FILES echo $FILES
zcat -f $FILES | awk -v MIRROR=$MIRROR ' zcat -f $FILES | awk -v MIRROR=$MIRROR '
/^Directory:/ { /^Directory:/ {
DIR = $2 DIR = $2
next next
} }
/^Files:/ { /^Files:/ {
in_files = 1 in_files = 1
next next
} }
/^ / { /^ / {
if (in_files) { if (in_files) {
gsub("^ ", "", $0) gsub("^ ", "", $0)
MD5 = $1 MD5 = $1
SIZE = $2 SIZE = $2
FILE = $3 FILE = $3
printf("%s %12s %s/%s/%s\n", MD5, SIZE, MIRROR, DIR, FILE); printf("%s %12s %s/%s/%s\n", MD5, SIZE, MIRROR, DIR, FILE);
next next
} }
} }
/^[^ ]/ { /^[^ ]/ {
in_files = 0 in_files = 0
FILE = "" FILE = ""
DIR = "" DIR = ""
}' | sort | uniq >> $OUT }' | sort | uniq >> $OUT
;; ;;
alpha|amd64|arm|armel|hppa|i386|ia64|m68k|mips|mipsel|powerpc|s390|sparc) alpha|amd64|arm|armel|hppa|i386|ia64|m68k|mips|mipsel|powerpc|s390|sparc)
FILES=`find $LOCATIONS -name Packages.gz | grep binary-$ARCH` FILES=`find $LOCATIONS -name Packages.gz | grep binary-$ARCH`
echo "Using MD5 sums from Packages files:" echo "Using MD5 sums from Packages files:"
echo $FILES echo $FILES
zcat -f $FILES | awk -v MIRROR=$MIRROR ' zcat -f $FILES | awk -v MIRROR=$MIRROR '
/^Filename:/ { /^Filename:/ {
FILE = $2 FILE = $2
} }
/^Size:/ { /^Size:/ {
SIZE = $2 SIZE = $2
} }
/^MD5sum:/ { /^MD5sum:/ {
MD5 = $2 MD5 = $2
printf("%s %12d %s/%s\n", MD5, SIZE, MIRROR, FILE) printf("%s %12d %s/%s\n", MD5, SIZE, MIRROR, FILE)
}' | sort | uniq >> $OUT }' | sort | uniq >> $OUT
# Use the new D-I images. Do NOT use the "current" # Use the new D-I images. Do NOT use the "current"
# link; it causes problems with overlaid files... # link; it causes problems with overlaid files...
for VER in $MIRROR/dists/$DI_CODENAME/main/installer-$ARCH/* for VER in $MIRROR/dists/$DI_CODENAME/main/installer-$ARCH/*
do do
if [ -d $VER ] && [ ! -L $VER ] ; then if [ -d $VER ] && [ ! -L $VER ] ; then
FILE=$VER/images/MD5SUMS FILE=$VER/images/MD5SUMS
echo "Using MD5 sums from d-i: $FILE" echo "Using MD5 sums from d-i: $FILE"
LOC=dists/$DI_CODENAME/main/installer-$ARCH/`basename $VER`/images LOC=dists/$DI_CODENAME/main/installer-$ARCH/`basename $VER`/images
for ENTRY in `cat $FILE | sed 's/ /:/g'` for ENTRY in `cat $FILE | sed 's/ /:/g'`
do do
@ -81,12 +81,12 @@ do
done | sort | uniq >> $OUT done | sort | uniq >> $OUT
fi fi
done done
;; ;;
*) *)
echo "Unknown arch/source $ARCH!" echo "Unknown arch/source $ARCH!"
exit 1 exit 1
;; ;;
esac esac
done done
exit 0 exit 0