#!/bin/sh OUT=ChangeLog BASE=http://etoys.squeak.org/updates VERSION=etoys5.0 FETCH="curl -s -S" #FETCH="wget -q -O -" TAC=`which tac || echo tail -r` UPDATES=`$FETCH $BASE/updates.list \ | tr '\r' '\n' \ | awk "/^#/{p=0};{if(p)print};/^#$VERSION/{p=1}" \ | $TAC \ ` mkdir -p updates mv -f $OUT $OUT~ COUNT=`echo $UPDATES|wc -w` for f in $UPDATES ; do N=$(($N+1)) printf "[$N/$COUNT] $f \r" [ -f updates/$f ] || $FETCH $BASE/$f > updates/$f echo >> $OUT echo === $f === >> $OUT cat updates/$f \ | tr '\r' '\n' \ | awk '/"/{if(p){print;exit}};/^"/{p=1};{if(p)print};/\!/{c=c+1;if(c>1)exit;if(p){print;exit}}' \ | sed 's/"//g;s/!//g' \ >> $OUT done printf "\n"