source: trunk/third/lprng/doc/UPDATE @ 14517

Revision 14517, 2.7 KB checked in by mwhitson, 25 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r14516, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
Line 
1#!/usr/contrib/bin/perl5
2($newvernum, $oldvernum) = @ARGV;
3($dir) = `pwd`;
4chomp $dir;
5print "dir $dir\n";
6($path, $prog) = ($dir =~ m,(.*)/(.*),);
7($name, $ver) = ($prog =~ m,(.*)-(.*),);
8print "prog $prog, name $name, ver $ver\n";
9@subs = split( /\./, $ver );
10@new = @subs;
11@old = @subs;
12$new[$#new] ++;
13$old[$#old] --;
14$newvernum = join( '.', @new ) unless $newvernum;
15$oldvernum = join( '.', @old ) unless $oldvernum;
16$newprog = $name . "-" . $newvernum;
17$oldprog = $name . "-" . $oldvernum;
18$newdir = $path . "/" . $newprog;
19print "prog $prog, name $name, ver $ver, newprog $newprog, oldprog $oldprog, newdir $newdir\n";
20
21@err = `rm -f $path/$name-*gz*`;
22## check in current version
23#print "doing gmake cifast\n";
24## `gmake cifast 2>&1 1>/dev/tty`;
25#@err = `gmake cifast`;
26#if( $? ){
27#       die "gmake cifast failed - @err $!\n";
28#}
29# make a distribution
30print "doing gmake dist\n";
31# `gmake dist 2>&1 1>/dev/tty`;
32@err = `gmake dist`;
33if( $? ){
34        die "gmake dist failed - @err $!\n";
35}
36if( ! -d "$path/OLD" ){
37        mkdir "$path/OLD",0755 or die "cannot make $path/OLD - $!\n";
38}
39@err = `cp $path/$prog.tgz $path/OLD `;
40if( $? ){ die "cp $path/$prog.tgz $path/OLD failed - $!\n"; }
41print "doing: cd $path/OLD; tar zxf $prog.tgz >/dev/tty\n";
42@err = `cd $path/OLD; tar zxf $prog.tgz >/dev/tty`;
43if( $? ){ die "untar OLD failed - $!\n"; }
44$patch="$name-$oldvernum-$ver.patch";
45@err = `rm -f $path/$patch $path/$patch.gz`;
46# open(PATCH,">$path/$patch") or die "cannot open $path/$patch - $!\n";
47# print PATCH <<"EOF" ;
48# # $patch Patch File- version $name-$oldvernum to $prog
49# #
50# # If the $name software current distribution directory is
51# # $prog, and this patch file is $patch.gz,
52# # do the following.  NOTE - the -p flag to patch is CRITICAL,
53# # otherwise the wrong files will get patched.
54# #
55# # cd $name-$oldvernum
56# # gunzip -c $patch.gz | patch -p
57# # cd ..
58# # mv $name-$oldvernum $prog
59# #
60# # ------ Patch starts here ----
61#
62# EOF
63# close PATCH;
64# print "cd $path/OLD/$prog; diff -c3 -i -r -P ../$name-$oldvernum . >>$path/$patch\n" ;
65# @err = `cd $path/OLD/$prog; diff -c3 -i -r -P ../$name-$oldvernum . >>$path/$patch` ;
66# print "doing gzip $path/$patch and md5 digest\n";
67# @err = `gzip $path/$patch`;
68# @err = ` md5 $path/$patch.gz | pgp -fast -u papowell\@astart > $path/$patch.gz.md5 `;
69
70print "\nupdating directory name and links\n";
71@err = `mv $dir $newdir`;
72if( $? ){ die "mv $dir $newdir failed - @err $!\n"; }
73if( -l "$path/$name" ){
74        print "removing link $path/$name\n";
75        @err = `rm $path/$name`;
76        if( $? ){ die "rm link $prog failed - @err $!\n"; }
77}
78@err = `chdir ..; ln -s $newprog $name`;
79if( $? ){ die "ln -s $newprog $name failed - @err $!\n"; }
80
81# make new version
82`gmake update 2>&1 1>/dev/tty`;
83if( $? ){
84        die "gmake update failed - $!\n";
85}
Note: See TracBrowser for help on using the repository browser.