File: dfpy

package info (click to toggle)
perl-tk 1%3A800.025-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,444 kB
  • ctags: 19,081
  • sloc: ansic: 206,740; perl: 40,187; makefile: 4,371; sh: 2,373; yacc: 762
file content (88 lines) | stat: -rwxr-xr-x 1,641 bytes parent folder | download | duplicates (5)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/local/bin/perl

use ExtUtils::Manifest "/mani/";
use Cwd;

sub System
{
 my $pid = fork;
 if ($pid)
  {
   local %SIG;
   $SIG{INT} = sub { warn "\nInterrupt"; kill 9,$pid; exit 1 };
   wait;
   die "Error $?" if ($?);
  }
 else
  {
   exec(@_) || die "Cannot exec".join(' ',@_).":$!";
  }
}

System("perl","Makefile.PL") unless (-r "Makefile");

$dir = getcwd;
$dir =~ s#^.*/##;

sub grab
{
 my $dir;
 foreach $dir (@_)
  {
   my $pref = $dir eq '.' ? '' : "$dir/";
   unless (-d $dir)
    {
     warn "No $dir";
     next; 
    }
   my $files = maniread("${pref}MANIFEST");
   push(@files,grep(-f $_,sort map("${pref}$_",keys %$files)));
  }
}

System('make','-C','.','manifest');
push(@files,"../unpack","../Tkpatch","../newest");
grab(".","../Ned","../DPS");
@files = grep(-w $_,@files);
# push(@files,grep(-M $_ < 7,<../../useful/*>));
push(@files,grep(-M $_ < 14,<ToDo/*>));
@files = grep(!/\.(ps|ppm|n|2|htm|gif)$/ || -M $_ < 7,@files);
# @files = grep(!m#/(mTk\.b\d|merge)/#,@files);
push(@files,"Tix/tcl2perl");


@files = grep(!/\.d$/,@files);

foreach (grep(!-r $_,@files))
 {
  print "$_ does not exist\n";
 }

@files = grep(-r $_,@files);

@files = grep(-M $_ < 7,@files);

print "$^O\n";

system("volcheck") if ($^O eq 'solaris');

foreach ("/vol/dev/aliases/floppy0","/dev/rdiskette","/dev/rfd0")
 {
  if (-c $_)
   {
    $floppy = $_;
    last;
   }
 }

($sec,$min,$hour,$mday,$mon,$year) = localtime;

$mon++;
$name = "TkRecent-$year.$mon.$mday.tar.gz";

chdir("..");
System("gtar","-czvf",$name,'--block-compress',map("$dir/". $_,@files));
System("tar","-cvfb",$floppy,36,$name);
System("tar","-tvfb",$floppy,36);