the script used to extract a release
[nvi.git] / dist / export
blobbb22fd08d66ba6982ff0fb032b948ec2317a9542
1 #!/bin/sh
2 revision=${@:-now}
3 cvsrev=`echo $revision | sed -e 's/-//;s/\./-/g'`
4 option="-r $cvsrev"
5 dir=$revision
6 version=`echo $revision | sed -e 's/nvi-//'`
7 date=`date +%Y-%m-%d`
8 if test "$revision" = now; then
9 dir=vi-current;
10 option="-D now"
11 version=current;
14 cvs export $option -d $dir vi
15 (cd $dir/dist
16 sh distrib --include-deps
17 rm export
19 (cd $dir/docs
20 mkdir html
21 for i in edit exref vi.man vi.ref vitut; do
22 (cd $i;
23 make;
24 rm -f core # grops sometimes dumps core on me
25 );
26 done
28 (cd $dir
29 perl -pi -e "s/version 1.80/version $version/" README
30 perl -pi -e "s(%H%)($date)" README
32 (cd $dir/ex
33 perl -pi -e "s/\\\$Revision: 8.1 $/$version/" version.h
34 perl -pi -e "s(%H%)($date)" version.h
36 tar czf $dir.tar.gz $dir