Update of /cvsroot/libfunutil/libfunutil/toc/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv13736
Modified Files:
makedist
Log Message:
added md5 info for the tarred files
Index: makedist
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/bin/makedist,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- makedist 28 Aug 2003 23:08:27 -0000 1.2
+++ makedist 31 Aug 2003 00:51:40 -0000 1.3
@@ -23,23 +23,14 @@
open DLIST, "<$DISTFILES_LIST" || die "Cannot open dist files list, $DISTFILES_LIST!";
@list = <DLIST>;
+# print @list;
close DLIST;
@thelist = ();
-#@nonofiles = ();
-#"|/CVS/?|","|toc\.make$|"
-# $skipit = false;
-# foreach $n ( @nonofiles ) {
-# if( $l =~ $n ) {
-# $skipit=true;
-# break;
-# }
-# }
-# next if $skipit;
-
foreach $l (@list) {
next if $l =~ /^#/;
+ next if $l =~ m|^(.*/)?toc.q?make$|;
chomp( $l );
next unless $l =~ /\w/;
@@ -62,9 +53,23 @@
$tarargs = "--exclude='*.o' --exclude='CVS' --exclude='toc.make' --files-from=$tarfileslist";
+
execcmd( "tar cf - $tarargs | tar xf - -C \"$basename\"" );
-execcmd( "rm $tarfileslist" );
# ^^^^ got that? it's simpler than cp'ing the list of files to their proper subdirs. :)
+
+$md5 = `which md5sum 2>/dev/null`;
+if( $md5 ) {
+ $md5file = "$basename/MD5SUMS.$basename";
+ print STDERR "Generating md5 sums: $md5file\n";
+# execcmd( "cd $basename; for x in \$(find . -type f); do md5sum \$x >> MD5SUMS.$basename; done" );
+ execcmd( "for x in \$(cat $tarfileslist); do md5sum \$x; done > $md5file" )
+} else {
+ print STDERR "Warning: no md5sum found, so not including md5 info.\n";
+}
+
+
+
+execcmd( "rm $tarfileslist" );
execcmd( "tar cf \"$TARBALL\" \"$basename\"" );
execcmd( "rm -fr \"$basename\"" );
|