Bug 34088: Move the 'needs update' test to a separate script
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
954215d6f9
commit
26de0bfaa0
3 changed files with 7 additions and 8 deletions
2
debian/scripts/koha-upgrade-schema
vendored
2
debian/scripts/koha-upgrade-schema
vendored
|
@ -43,7 +43,7 @@ do
|
||||||
echo "Upgrading database schema for $name"
|
echo "Upgrading database schema for $name"
|
||||||
KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
|
KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
|
||||||
PERL5LIB=$PERL5LIB \
|
PERL5LIB=$PERL5LIB \
|
||||||
"$CGI_PATH/installer/data/mysql/updatedatabase.pl"
|
"$CGI_PATH/installer/data/mysql/needs_update.pl" && "$CGI_PATH/installer/data/mysql/updatedatabase.pl"
|
||||||
else
|
else
|
||||||
die "Error: Invalid instance name $name"
|
die "Error: Invalid instance name $name"
|
||||||
fi
|
fi
|
||||||
|
|
6
installer/data/mysql/needs_update.pl
Executable file
6
installer/data/mysql/needs_update.pl
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use Modern::Perl;
|
||||||
|
|
||||||
|
use Koha::Installer;
|
||||||
|
exit !Koha::Installer->needs_update;
|
|
@ -29,13 +29,6 @@
|
||||||
|
|
||||||
use Modern::Perl;
|
use Modern::Perl;
|
||||||
|
|
||||||
BEGIN {
|
|
||||||
use Koha::Installer;
|
|
||||||
if ( !Koha::Installer->needs_update ) {
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
use feature 'say';
|
use feature 'say';
|
||||||
|
|
||||||
# CPAN modules
|
# CPAN modules
|
||||||
|
|
Loading…
Reference in a new issue