[Koha-cvs] CVS: koha buildrelease,1.1.2.26,1.1.2.27
Steve Tonnesen
tonnesen at users.sourceforge.net
Wed Jan 15 19:20:57 CET 2003
Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv20340
Modified Files:
Tag: rel-1-2
buildrelease
Log Message:
buildrelease now uses template files from the koha-tmpl repository instead of
the koha-tmpl directory in the koha repository
Index: buildrelease
===================================================================
RCS file: /cvsroot/koha/koha/Attic/buildrelease,v
retrieving revision 1.1.2.26
retrieving revision 1.1.2.27
diff -C2 -r1.1.2.26 -r1.1.2.27
*** buildrelease 29 Oct 2002 20:22:32 -0000 1.1.2.26
--- buildrelease 15 Jan 2003 18:20:54 -0000 1.1.2.27
***************
*** 6,9 ****
--- 6,10 ----
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;
***************
*** 21,24 ****
--- 22,28 ----
$kohahtmldir=$1;
}
+ if (/kohatmpldir=(.*)/) {
+ $kohatmpldir=$1;
+ }
}
$has_kohaautobuild_conf = 1;
***************
*** 53,60 ****
--- 57,71 ----
}
+ 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
|;
***************
*** 235,238 ****
--- 246,265 ----
+ 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");
+ }
+
+
***************
*** 251,255 ****
mkdir("docs", 0755);
! # Create koha.versin file
open (KV, ">$rootdir/koha.version");
--- 278,282 ----
mkdir("docs", 0755);
! # Create koha.version file
open (KV, ">$rootdir/koha.version");
***************
*** 323,330 ****
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");
# Remove extraneous files from opac-html
--- 350,356 ----
system("cp -a $kohahtmldir/opac-html/* $rootdir/opac-html");
! # 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
***************
*** 393,395 ****
--- 419,434 ----
}
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;
}
More information about the Koha-cvs
mailing list