#!/usr/bin/perl my @files; my @difs; my $cwd = `pwd`; chomp $cwd; $cwd =~ s/.*\///; for (`cvs -q update`) { print; next if /\.swp$/; if (/^\? (\S+)/) { push @files, "$cwd/$1"; } if (/^M (\S+?)(\.\w+)?\s/) { push @files, "$cwd/$1$2"; push @diffs, "$cwd/$1.diff"; system "cvs diff -u $1$2 > $1.diff"; } } chdir ".."; system "rm -f ${cwd}.tgz"; system "tar cvzf ${cwd}.tgz " . join(' ',@files,@diffs) . "\n"; system "rm -f " . join(' ',@diffs) . "\n";