3 # create a tar ball snapshot from cvs repository.
11 my $version_file = "$srcdir/patchlevel.h";
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 while (defined(my $line = <IN
>))
31 $version{$1} = (defined $3) ?
$3 : $4 if $line =~ m{^#\s*define\s+(\w+)\s+("([^"]*)"|(\S+))};
35 my $version = "$version{REV}.$version{VERS}.$version{PATCHLEVEL}";
36 my $tmpdir = "/tmp/mktar-$^T";
37 mkdir $tmpdir or die "cannot mkdir $tmpdir: $!";
38 system "cp -a $srcdir $tmpdir" and die "'cp -a $srcdir $tmpdir' failed: $!";
39 rename "$tmpdir/$srcdir", "$tmpdir/screen-$version" or die "rename to screen-$version failed: $!";
41 system "tar zcf - -C $tmpdir > screen-$version.tar.gz screen-$version";
42 system "rm -rf $tmpdir";
44 print "screen-$version.tar.gz written.\n";