[Koha-cvs] CVS: koha buildrelease,1.1.2.10,1.1.2.11 installer.pl,1.2.2.45,1.2.2.46

Steve Tonnesen tonnesen at users.sourceforge.net
Thu Jun 27 21:07:23 CEST 2002


Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv10814

Modified Files:
      Tag: rel-1-2
	buildrelease installer.pl 
Log Message:
Checks if a previous version of Koha is installed and prompts to run
koha.upgrade if so.  Removed option to specify the location of koha.conf as the
/etc/ location is hardcoded in Database.pm and Output.pm.  Plus, we need to
know where it is when upgrading.  Added opacdir, intranetdir, and kohaversion
settings to koha.conf


Index: buildrelease
===================================================================
RCS file: /cvsroot/koha/koha/Attic/buildrelease,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -C2 -r1.1.2.10 -r1.1.2.11
*** buildrelease	26 Jun 2002 22:37:18 -0000	1.1.2.10
--- buildrelease	27 Jun 2002 19:07:21 -0000	1.1.2.11
***************
*** 184,187 ****
--- 184,193 ----
  mkdir("docs", 0755);
  
+ # Create koha.versin file
+ 
+ open (KV, ">$rootdir/koha.version");
+ print KV "$releaseversion\n";
+ close KV;
+ 
  # Copy all CVS files to intranet-cgi
  system("cp -a $kohadir/* $rootdir/intranet-cgi");
***************
*** 200,203 ****
--- 206,210 ----
  system("mv $rootdir/intranet-cgi/databaseinstall.sh $rootdir");
  system("mv $rootdir/intranet-cgi/installer.pl $rootdir"); 
+ chmod 0770, "$rootdir/installer.pl";
  system("mv $rootdir/intranet-cgi/koha.conf $rootdir");
  system("mv $rootdir/intranet-cgi/koha.mysql $rootdir");

Index: installer.pl
===================================================================
RCS file: /cvsroot/koha/koha/installer.pl,v
retrieving revision 1.2.2.45
retrieving revision 1.2.2.46
diff -C2 -r1.2.2.45 -r1.2.2.46
*** installer.pl	27 Jun 2002 05:28:23 -0000	1.2.2.45
--- installer.pl	27 Jun 2002 19:07:21 -0000	1.2.2.46
***************
*** 9,12 ****
--- 9,41 ----
  }
  
+ my $kohaversion=`cat koha.version`;
+ chomp $kohaversion;
+ 
+ if (-e "/etc/koha.conf") {
+     my $installedversion=`grep kohaversion= /etc/koha.conf`;
+     chomp $installedversion;
+     $installedversion=~m/kohaversion=(.*)/;
+     $installedversion=$1;
+     if ($installedversion) {
+ 	$installedversion="You currently have Koha $installedversion on your system.\n";
+     } else {
+ 	$installedversion="I am not able to determine what version of Koha is installed now.\n";
+     }
+ 
+     print qq|
+ 			==========================
+ 			= Koha already installed =
+ 			==========================
+ 
+ It looks like Koha is already installed on your system (/etc/koha.conf exists
+ already).  If you would like to upgrade your system to $kohaversion, please use
+ the koha.upgrade script in this directory.
+ 
+ $installedversion
+ 
+ |;
+     exit;
+ }
+ 
  system('clear');
  print qq|
***************
*** 163,178 ****
  KOHA.CONF
  =========
! Koha uses a small configuration file that is usually placed in your /etc/ files 
! directory. The configuration file, will be created in this directory
  
  |;
  
  #Get the path to the koha.conf directory
! print "Enter the path to your configuration directory [$etcdir]: ";
! chomp($input = <STDIN>);
! 
! if ($input) {
!   $etcdir = $input;
! }
  
  
--- 192,207 ----
  KOHA.CONF
  =========
! Koha uses a small configuration file that is placed in your /etc/ files
! directory. The configuration file, will be created in this directory.
  
  |;
  
  #Get the path to the koha.conf directory
! #print "Enter the path to your configuration directory [$etcdir]: ";
! #chomp($input = <STDIN>);
! #
! #if ($input) {
! #  $etcdir = $input;
! #}
  
  
***************
*** 248,251 ****
--- 277,283 ----
  pass=$pass
  includes=$kohadir/htdocs/includes
+ intranetdir=$kohadir
+ opacdir=$opacdir
+ version=$kohaversion
  EOP
  ;
***************
*** 426,430 ****
      if ($includesmodule) {
  	$includesdirectives.="Options +Includes\n";
! 	$includesdirectives.="AddHandler server-parsed .html\n";
      }
      open(SITE,">>$realhttpdconf") or warn "Insufficient priveleges to open $realhttpdconf for writing.\n";
--- 458,462 ----
      if ($includesmodule) {
  	$includesdirectives.="Options +Includes\n";
! 	$includesdirectives.="   AddHandler server-parsed .html\n";
      }
      open(SITE,">>$realhttpdconf") or warn "Insufficient priveleges to open $realhttpdconf for writing.\n";





More information about the Koha-cvs mailing list