Update of /cvsroot/mhonarc/install.me
In directory subversions:/tmp/cvs-serv5067

Modified Files:
        NEWS install.me 
Log Message:
* Added module dependency check support.  Dependent modules are listed
  in FILELIST as follows:

    dep:<module_name>

  A separate dep: line is used for each dependent module.

  The -nodep option can be used to skip the dependency check.


Index: NEWS
===================================================================
RCS file: /cvsroot/mhonarc/install.me/NEWS,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** NEWS        31 Mar 2002 07:28:45 -0000      1.1
--- NEWS        14 May 2002 19:40:46 -0000      1.2
***************
*** 1,4 ****
  ===========================================================================
! 2002/03/31: v1.0.0
  
  First independent release.  The install.me program has been used
--- 1,16 ----
  ===========================================================================
! 2002/MM/DD    1.1.0
! 
! * Added module dependency check support.  Dependent modules are listed
!   in FILELIST as follows:
! 
!     dep:<module_name>
! 
!   A separate dep: line is used for each dependent module.
! 
!   The -nodep option can be used to skip the dependency check.
! 
! ===========================================================================
! 2002/03/31    1.0.0
  
  First independent release.  The install.me program has been used

Index: install.me
===================================================================
RCS file: /cvsroot/mhonarc/install.me/install.me,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** install.me  31 Mar 2002 07:28:45 -0000      1.17
--- install.me  14 May 2002 19:40:46 -0000      1.18
***************
*** 14,18 ****
  ##    the installation program the type of file it is.
  ##---------------------------------------------------------------------------##
! ##    Copyright (C) 1997-1999 Earl Hood, [EMAIL PROTECTED]
  ##
  ##    This program is free software; you can redistribute it and/or modify
--- 14,18 ----
  ##    the installation program the type of file it is.
  ##---------------------------------------------------------------------------##
! ##    Copyright (C) 1997-2002 Earl Hood, [EMAIL PROTECTED]
  ##
  ##    This program is free software; you can redistribute it and/or modify
***************
*** 247,250 ****
--- 247,251 ----
                   manpath=s
                   nobin
+                  nodep
                   nodoc
                   nolib
***************
*** 303,307 ****
  
  {
!     my($dobin, $dolib, $dodoc, $doman);
  
      ## Get installation files
--- 304,308 ----
  
  {
!     my($dodep, $dobin, $dolib, $dodoc, $doman);
  
      ## Get installation files
***************
*** 312,315 ****
--- 313,318 ----
      $DefValues{'docpath'} .= $DIRSEP . $Files{'name'}[0]
        if $Files{'name'}[0];
+     $dodep = defined($Files{'dep'}) && scalar(@{$Files{'dep'}}) &&
+            !$OptValues{'nodep'};
      $dobin = defined($Files{'bin'}) && scalar(@{$Files{'bin'}}) &&
             !$OptValues{'nobin'};
***************
*** 323,326 ****
--- 326,358 ----
        unless $dobin or $dolib or $dodoc or $doman;
  
+     ## Check for dependencies
+     ## ----------------------
+     if ($dodep) {
+       print STDOUT "Checking dependencies:\n";
+       my($mod);
+       my(@dont_exist) = ();
+       foreach $mod (@{$Files{'dep'}}) {
+           print STDOUT sprintf("\t%s %s ", $mod, ('.'x(30-length($mod))));
+           if ($mod =~ /\.pl$/) {
+               eval {
+                   require $mod;
+               };
+           } else {
+               eval qq{
+                   require $mod;
+               };
+           }
+           if ($@) {
+               print STDOUT "NOT OK!\n";
+               push(@dont_exist, $mod);
+           } else {
+               print STDOUT "ok\n";
+           }
+       }
+       if (@dont_exist) {
+           die "ERROR: Dependency check FAILED\n";
+       }
+     }
+ 
      ## Get path stuff
      ## --------------
***************
*** 762,765 ****
--- 794,798 ----
    -manpath <path>       : Directory path to manpages
    -nobin                : Do not install programs
+   -nodep                : Skip module dependency check
    -nodoc                : Do not install documentation
    -nolib                : Do not install library files

---------------------------------------------------------------------
To sign-off this list, send email to [EMAIL PROTECTED] with the
message text UNSUBSCRIBE MHONARC-DEV

Reply via email to