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:
Jonathan Druart 2024-09-05 12:03:09 +02:00 committed by Katrin Fischer
parent 954215d6f9
commit 26de0bfaa0
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
3 changed files with 7 additions and 8 deletions

View file

@ -43,7 +43,7 @@ do
echo "Upgrading database schema for $name"
KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
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
die "Error: Invalid instance name $name"
fi

View file

@ -0,0 +1,6 @@
#!/usr/bin/perl
use Modern::Perl;
use Koha::Installer;
exit !Koha::Installer->needs_update;

View file

@ -29,13 +29,6 @@
use Modern::Perl;
BEGIN {
use Koha::Installer;
if ( !Koha::Installer->needs_update ) {
exit;
}
}
use feature 'say';
# CPAN modules