[interchange-cvs] interchange - jon modified scripts/makecat.PL

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Mon Jun 17 18:43:02 2002


User:      jon
Date:      2002-06-17 22:42:06 GMT
Modified:  scripts  makecat.PL
Log:
Tolerate empty share directory (nice for RPM build which doesn't need
same images in two places), and make an error message prettier.

Revision  Changes    Path
2.14      +8 -5      interchange/scripts/makecat.PL


rev 2.14, prev_rev 2.13
Index: makecat.PL
===================================================================
RCS file: /var/cvs/interchange/scripts/makecat.PL,v
retrieving revision 2.13
retrieving revision 2.14
diff -u -u -r2.13 -r2.14
--- makecat.PL	5 Feb 2002 08:41:32 -0000	2.13
+++ makecat.PL	17 Jun 2002 22:42:06 -0000	2.14
@@ -50,7 +50,7 @@
 #
 # Interchange catalog configurator
 #
-# $Id: makecat.PL,v 2.13 2002/02/05 08:41:32 mheins Exp $
+# $Id: makecat.PL,v 2.14 2002/06/17 22:42:06 jon Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -1956,13 +1956,16 @@
 			chdir "$Conf{relocate}$Conf{vendroot}"
 				or die "\nchdir $Conf{relocate}$Conf{vendroot}: $!\n";
 			# remember directories so we can chown below
-			chdir "share" or die "\nchdir 'share': $!\n";
+			chdir "share" or die "error.\nchdir 'share': $!\n";
 			map { push @sharedirs, $_ if -d $_ } glob('*');
 			chdir "..";
 			copy_dir("share", "$Conf{relocate}$Conf{sharedir}") or die;
 		};
-		if ($@) {
-			print "\nError installing share/ files: $@\n";
+		if (! @sharedirs) {
+			print "none found.\n";
+		}
+		elsif ($@) {
+			print "error.\nError installing share/ files: $@\n";
 		} else {
 			File::Find::find(
 				$chg_to_catuser,
@@ -2301,7 +2304,7 @@
 
 =head1 VERSION
 
-# $Id: makecat.PL,v 2.13 2002/02/05 08:41:32 mheins Exp $
+# $Id: makecat.PL,v 2.14 2002/06/17 22:42:06 jon Exp $
 
 =head1 INTRODUCTION