aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mkwebpage
blob: bdb1bbf3c08063871ebefaeccd76789929bba193 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
# Make a snapshot of the CVS head revision for the gnupg webpages
# and put them into the FTP directory (so that the mirrors w/o rsync
# can access them


set -e

cd $HOME/pub


fix_it () {
    dir=$1

    cat <<EOF >$dir/NEWS
[ This is a snapshot of the NEWS file from the CVS head revision.
  You will find the NEWS for the latest revision below the line
  "Noteworthy changes in version 0.x.y".
						     (wk $(date +%Y-%m-%d)) ]


EOF
    cvs -Q checkout -p gnupg/NEWS >>$dir/NEWS
    cvs -Q checkout -p gnupg/BUGS >>$dir/BUGS
    here=`pwd`
    cd $dir
    ln -sf gnupg.html index.html
    sed -n '1,/@BEGIN_BUGLIST@/ p' buglist.html       >buglist.tmp
    sed    '1,/^~~~~~~~~~~~/ d'  BUGS                >>buglist.tmp
    echo "(List generated from CVS: " $(date +%Y-%m-%d) ")"  >>buglist.tmp
    sed -n '/@END_BUGLIST@/,$ p'   buglist.html      >>buglist.tmp
    mv	buglist.tmp buglist.html
    cd $here
}



do_export () {
    pgm=$1
    mod=$2

    rm -rf $pgm.new || true
    rm -rf $pgm.old || true
    cvs -Q export -r HEAD -d $pgm.new $mod
    fix_it $pgm.new
    [ -d $pgm ] && mv $pgm $pgm.old
    if ! mv $pgm.new $pgm ; then
	echo "rename failed - restoring" >&2
	mv $pgm.old $pgm
	exit 1
    fi
    rm -rf $pgm.old || true
}


do_export gnupg-www gnupg-www

cd gnupg-www
tar czf /home/ftp/pub/gcrypt/old/webpages.tmp *
mv /home/ftp/pub/gcrypt/old/webpages.tmp /home/ftp/pub/gcrypt/old/webpages.tar.gz


exit 0