source: genapp/sbin/mkchangearc.pl

Last change on this file was 838, checked in by ehb, 6 years ago

add mkchangearc.pl utility

  • Property svn:executable set to *
File size: 645 bytes
Line 
1#!/usr/bin/perl
2
3# $debug++;
4
5my $gb   = $ENV{ "GENAPP" } || die "$0: environment variable GENAPP must be set\n";
6
7$notes = "usage: $0 arcname
8will make arcname.txz for all M or A svn stat files
9useful for backing up changes without committing them to the svn
10";
11
12$an = shift || die $notes;
13
14$an =~ s/\.txz//i;
15$date = `date +\%Y\%m\%d\%H\%M\%S`;
16chomp $date;
17$an .= "-$date.txz";
18
19die "$0: $an exists
20rm $an
21and try again\n" if -e $an;
22
23@files = `cd $gb; svn stat | grep '^[AM]' | awk '{ print \$2 }'`;
24grep chomp, @files;
25
26$files = join " ", @files;
27
28$cmd = "cd $gb; tar Jcf $an $files\n";
29print $cmd;
30print `$cmd` if !$debug;
31print "$an\n";
32
Note: See TracBrowser for help on using the repository browser.