3 # create a tar ball snapshot from cvs repository.
11 my $version_file = "$srcdir/configure.ac";
15 'doc/install.sh' => '../install.sh'
18 for my $l (keys %symlinks)
20 my $ll = "$srcdir/$l";
22 print "replacing $ll with a symlink to $symlinks{$l}\n";
24 symlink $symlinks{$l}, $ll;
28 open IN
, "<", $version_file or die "unable to read $version_file: $!";
29 $version = $1 if <IN
> =~ /AC_INIT\(\[[^\]]+\],\[(\d+\.\d+\.\d+)\]/;
32 my $tmpdir = "/tmp/mktar-$^T";
33 mkdir $tmpdir or die "cannot mkdir $tmpdir: $!";
34 system "cp -a $srcdir $tmpdir" and die "'cp -a $srcdir $tmpdir' failed: $!";
35 rename "$tmpdir/$srcdir", "$tmpdir/screen-$version" or die "rename to screen-$version failed: $!";
37 system "tar zcf - -C $tmpdir > screen-$version.tar.gz screen-$version";
38 system "rm -rf $tmpdir";
40 print "screen-$version.tar.gz written.\n";