From 723593d19ce070250ac638e72b0be6a701dbf958 Mon Sep 17 00:00:00 2001 From: Marc Chantreux Date: Thu, 2 Jul 2009 13:16:17 +0200 Subject: [PATCH] honor the DESTDIR environement variable when set for exemple: when you use install_misc/environment_Makefile.PL DESTDIR=$HOME by default but koha is installed in $HOME/koha-dev that is not expected! --- Makefile.PL | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index 3f148658ca..08030086a6 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -841,7 +841,10 @@ be run from the current directory. Configuration directory:); # FIXME - home directory portability consideration apply - $install_base_default = (exists $ENV{'HOME'}) ? "$ENV{'HOME'}/koha-dev" : "$defaults->{'INSTALL_BASE'}-dev"; + $install_base_default = + $ENV{DESTDIR} + || ( exists $ENV{HOME} ? "$ENV{HOME}/koha-dev" : "$defaults->{'INSTALL_BASE'}-dev" ) + ; } elsif ($config{'INSTALL_MODE'} eq 'single') { $msg = "\nPlease specify the directory in which to install Koha"; # FIXME -- we're assuming under a 'single' mode install -- 2.20.1