From: Marc Chantreux Date: Thu, 2 Jul 2009 11:16:17 +0000 (+0200) Subject: honor the DESTDIR environement variable when set X-Git-Tag: n_acq_a_porter~20 X-Git-Url: http://git.rot13.org/?p=koha.git;a=commitdiff_plain;h=723593d19ce070250ac638e72b0be6a701dbf958 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! --- 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