install: tweaked 'make update'
authorGalen Charlton <galen.charlton@liblime.com>
Fri, 15 Feb 2008 08:04:36 +0000 (21:04 +1300)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 15 Feb 2008 14:30:53 +0000 (08:30 -0600)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Makefile.PL
install_misc/UpgradeBackup.pm

index 79c0375..bac9ff9 100644 (file)
@@ -1400,16 +1400,15 @@ upgrade :: make_upgrade_backup install
 \t\$(NOECHO) \$(NOOP)
 make_upgrade_backup ::
 \t\$(NOECHO) umask 022; \$(MOD_BACKUP) \\
-\t\t\$(KOHA_INST_KOHA_CONF_DIR) \$(KOHA_DEST_KOHA_CONF_DIR) \\
-\t\t\$(KOHA_INST_INTRANET_TMPL_DIR) \$(KOHA_DEST_INTRANET_TMPL_DIR) \\
-\t\t\$(KOHA_INST_INTRANET_WWW_DIR) \$(KOHA_DEST_INTRANET_WWW_DIR) \\
-\t\t\$(KOHA_INST_OPAC_TMPL_DIR) \$(KOHA_DEST_OPAC_TMPL_DIR) \\
-\t\t\$(KOHA_INST_OPAC_WWW_DIR) \$(KOHA_DEST_OPAC_WWW_DIR) \\
-\t\t\$(KOHA_INST_OPAC_TMPL_DIR) \$(KOHA_DEST_OPAC_TMPL_DIR) \\
-\t\t\$(KOHA_INST_OPAC_WWW_DIR) \$(KOHA_DEST_OPAC_WWW_DIR) \\
-\t\t\$(KOHA_INST_PAZPAR2_CONF_DIR) \$(KOHA_DEST_PAZPAR2_CONF_DIR) \\
-\t\t\$(KOHA_INST_ZEBRA_CONF_DIR) \$(KOHA_DEST_ZEBRA_CONF_DIR)
 /;
+    foreach my $key (qw/KOHA_CONF_DIR INTRANET_TMPL_DIR INTRANET_WWW_DIR OPAC_TMPL_DIR OPAC_WWW_DIR
+                     PAZPAR2_CONF_DIR ZEBRA_CONF_DIR/) {
+       $upgrade .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n" 
+            unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or
+                   exists $skip_directories->{$key} or
+                   not exists $target_directories->{$key};
+    }
+    $upgrade =~ s/\\\n$/\n/;
 
     return $upgrade;
 }
index 869d1e1..f27a71b 100644 (file)
@@ -81,6 +81,12 @@ sub backup_changed_files {
 
 =head1 AUTHOR
 
+Code based on parts of ExtUtils::Install in order to
+approximately track how it identifies files to
+install.
+
+Koha Development Team <info@koha.org>
+
 Galen Charlton <galen.charlton@liblime.com>
 
 =cut