buildrelease now uses template files from the koha-tmpl repository instead of
the koha-tmpl directory in the koha repository
This commit is contained in:
parent
080c55030f
commit
277668c4ee
49
buildrelease
49
buildrelease
|
|
@ -5,6 +5,7 @@ sub guess_kohahtmldir ($;$);
|
|||
my $kohadir=`pwd`;
|
||||
chomp $kohadir;
|
||||
my $kohahtmldir=guess_kohahtmldir($kohadir, "/koha/koha/koha-html/");
|
||||
my $kohatmpldir=guess_kohatmpldir($kohadir, "/koha/koha/koha-tmpl/");
|
||||
my $roothomedir=(getpwuid(0))[7]; # ~root is traditionally just /
|
||||
$roothomedir='/root' unless defined $roothomedir;
|
||||
|
||||
|
|
@ -20,6 +21,9 @@ if (-e "$roothomedir/.kohaautobuild.conf") {
|
|||
if (/kohahtmldir=(.*)/) {
|
||||
$kohahtmldir=$1;
|
||||
}
|
||||
if (/kohatmpldir=(.*)/) {
|
||||
$kohatmpldir=$1;
|
||||
}
|
||||
}
|
||||
$has_kohaautobuild_conf = 1;
|
||||
}
|
||||
|
|
@ -52,10 +56,17 @@ if ($input) {
|
|||
$kohahtmldir=$input;
|
||||
}
|
||||
|
||||
print "\nWhere is the 'koha-tmpl' cvs module located [$kohatmpldir]: ";
|
||||
chomp($input = <STDIN>);
|
||||
if ($input) {
|
||||
$kohatmpldir=$input;
|
||||
}
|
||||
|
||||
open (C, ">$roothomedir/.kohaautobuild.conf");
|
||||
print C qq|
|
||||
kohadir=$kohadir
|
||||
kohahtmldir=$kohahtmldir
|
||||
kohatmpldir=$kohatmpldir
|
||||
|;
|
||||
|
||||
print "\n\nGuessing at next release version. You may need to enter your SourceForge password...\n";
|
||||
|
|
@ -234,6 +245,22 @@ Tagging koha-html with tag R_$tagname
|
|||
}
|
||||
|
||||
|
||||
print qq|
|
||||
Updating your checked-out copy of the 'koha-tmpl' CVS files.
|
||||
You may need to enter your SourceForge password.
|
||||
Using $kohatmpldir.
|
||||
|;
|
||||
chdir($kohatmpldir) || die "$kohatmpldir: $!\n";
|
||||
system("cvs update");
|
||||
|
||||
if ($cvstag) {
|
||||
print qq|
|
||||
Tagging koha-tmpl with tag R_$tagname
|
||||
|;
|
||||
system("cvs tag -F R_$tagname");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
my $rootdir="/tmp/koha-".$releaseversion;
|
||||
|
|
@ -250,7 +277,7 @@ mkdir("scripts/z3950daemon", 0755);
|
|||
mkdir("modules", 0755);
|
||||
mkdir("docs", 0755);
|
||||
|
||||
# Create koha.versin file
|
||||
# Create koha.version file
|
||||
|
||||
open (KV, ">$rootdir/koha.version");
|
||||
print KV "$releaseversion\n";
|
||||
|
|
@ -322,10 +349,9 @@ system("find $rootdir/intranet-cgi -name '*.pl' -exec chmod a+x \\{\\} \\;");
|
|||
system("cp -a $kohahtmldir/intranet-html/* $rootdir/intranet-html");
|
||||
system("cp -a $kohahtmldir/opac-html/* $rootdir/opac-html");
|
||||
|
||||
# Move koha-tmpl files
|
||||
system("mv $rootdir/intranet-cgi/koha-tmpl/opac-tmpl/* $rootdir/opac-html");
|
||||
system("mv $rootdir/intranet-cgi/koha-tmpl/intranet-tmpl/* $rootdir/intranet-html");
|
||||
system("rm -rf $rootdir/intranet-cgi/koha-tmpl");
|
||||
# Copy koha-tmpl files
|
||||
system("cp -a $kohatmpldir/opac-tmpl $rootdir/opac-html");
|
||||
system("cp -a $kohatmpldir/intranet-tmpl $rootdir/intranet-html");
|
||||
|
||||
# Remove extraneous files from opac-html
|
||||
system("rm -f $rootdir/opac-html/koha.mo");
|
||||
|
|
@ -393,3 +419,16 @@ sub guess_kohahtmldir ($;$) {
|
|||
}
|
||||
return $kohahtmldir;
|
||||
}
|
||||
|
||||
sub guess_kohatmpldir ($;$) {
|
||||
my($kohadir, $default) = @_;
|
||||
my $kohatmpldir;
|
||||
# It probably makes sense to assume that the 'koha' and 'koha-tmpl'
|
||||
# modules are checked out within the same parent directory
|
||||
if (-d $kohadir && $kohadir =~ /^(.*)\/[^\/]+$/) {
|
||||
$kohatmpldir = "$1/koha-tmpl"
|
||||
} else {
|
||||
$kohatmpldir = $default;
|
||||
}
|
||||
return $kohatmpldir;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue