Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mkChangeLog
blob: 0e629c1b2482cab9038b0714f1320fdebae3d699 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/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"