koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha-doc/en/sysadmin/maintenance Updating_Koha.xml


From: Stephen Hedges
Subject: [Koha-cvs] koha-doc/en/sysadmin/maintenance Updating_Koha.xml
Date: Thu, 16 Mar 2006 00:42:01 +0000

CVSROOT:        /sources/koha
Module name:    koha-doc
Branch:         
Changes by:     Stephen Hedges <address@hidden> 06/03/16 00:42:01

Modified files:
        en/sysadmin/maintenance: Updating_Koha.xml 

Log message:
        Add Le Gall's revisions

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-doc/en/sysadmin/maintenance/Updating_Koha.xml.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: koha-doc/en/sysadmin/maintenance/Updating_Koha.xml
diff -u koha-doc/en/sysadmin/maintenance/Updating_Koha.xml:1.2 
koha-doc/en/sysadmin/maintenance/Updating_Koha.xml:1.3
--- koha-doc/en/sysadmin/maintenance/Updating_Koha.xml:1.2      Tue Jan 11 
11:39:09 2005
+++ koha-doc/en/sysadmin/maintenance/Updating_Koha.xml  Thu Mar 16 00:42:01 2006
@@ -15,6 +15,14 @@
       <email>jmf at kados dot org</email>
     </author>
 
+    <author>
+      <firstname>Pierrick</firstname>
+
+      <surname>Le Gall</surname>
+
+      <email>pierrick at koha-fr dot org</email>
+    </author>
+
     <revhistory>
       <revision>
         <revnumber>2.2.0</revnumber>
@@ -40,6 +48,21 @@
           2.2.0</para>
         </revdescription>
       </revision>
+
+      <revision>
+        <revnumber>2.2.5</revnumber>
+
+        <date>2006-03-13</date>
+
+        <authorinitials>plg</authorinitials>
+
+        <revdescription>
+          <para>Bug fixes on symlinks. New script to create symlinks, with
+          comand-line parameters. Precision on CVS repository : use of CVS
+          working directory when talking about the checked out
+          directory.</para>
+        </revdescription>
+      </revision>
     </revhistory>
   </articleinfo>
 
@@ -183,9 +206,9 @@
     <title>Checking Out Koha from Sourceforge</title>
 
     <para>The checking out process is quite simple. Change your directory to
-    the directory you have selected as the root directory for your CVS
-    repository (mine is <filename>/build</filename>) and type: <userinput>cvs
-    -z3 -d:pserver:address@hidden:/cvsroot/koha co -r rel_2_2
+    the directory you have selected as the root directory for your CVS working
+    copy (mine is <filename>/build</filename>) and type: <userinput>cvs -z3
+    -d:pserver:address@hidden:/cvsroot/koha co -r rel_2_2
     koha</userinput></para>
 
     <para>At this point you should see a long listing of all the files that
@@ -263,32 +286,34 @@
     command with the <command>-s</command> option. For more info on
     <command>ln</command>, see the <command>man</command> page.</para>
 
-    <para>Here are the symlink mappings we're going to create:</para>
+    <para>$KOHA_WORKING_DIR is where you "checked out" Koha, $KOHA_INSTALL_DIR
+    is where you installed Koha (/usr/local/koha by default) Here are the
+    symlink mappings we're going to create:</para>
 
     <itemizedlist>
       <listitem>
-        <para>[your cvs root dir]/koha ---&gt;
-        /usr/local/koha/intranet/cgi-bin</para>
+        <para>$KOHA_WORKING_DIR ---&gt;
+        $KOHA_INSTALL_DIR/intranet/cgi-bin</para>
       </listitem>
 
       <listitem>
-        <para>[your cvs root dir]/koha/koha-tmpl-intranet-tmpl ---&gt;
-        /usr/local/koha/intranet/htdocs/intranet-tmpl</para>
+        <para>$KOHA_WORKING_DIR/koha-tmpl/intranet-tmpl ---&gt;
+        $KOHA_INSTALL_DIR/intranet/htdocs/intranet-tmpl</para>
       </listitem>
 
       <listitem>
-        <para>[your cvs root dir]/koha/C4 ---&gt;
-        /usr/local/koha/intranet/modules</para>
+        <para>$KOHA_WORKING_DIR/C4 ---&gt;
+        $KOHA_INSTALL_DIR/intranet/modules/C4</para>
       </listitem>
 
       <listitem>
-        <para>[your cvs root dir]/koha/opac ---&gt;
-        /usr/local/koha/opac/cgi-bin</para>
+        <para>$KOHA_WORKING_DIR/opac ---&gt;
+        $KOHA_INSTALL_DIR/opac/cgi-bin</para>
       </listitem>
 
       <listitem>
-        <para>[your cvs root dir]/koha/koha-tmpl/opac-tmpl ---&gt;
-        /usr/local/koha/opac/htdocs</para>
+        <para>$KOHA_WORKING_DIR/koha-tmpl/opac-tmpl ---&gt;
+        $KOHA_INSTALL_DIR/opac/htdocs/opac-tmpl</para>
       </listitem>
     </itemizedlist>
 
@@ -306,34 +331,112 @@
 
       <programlisting>#!/usr/bin/perl -w
 
-# Configurable Variables
-my $cvs_root_dir = ""; # insert your CVS repository root directory here
+use strict;
+use Getopt::Long;
+
+my %opt = ();
+GetOptions(
+    \%opt,
+    qw/working_dir=s install_dir=s no-backup help/
+) or die "\nHouston, we got a problem\n";
 
-my $intranet_cgi = "/usr/local/koha/intranet/cgi-bin";
-my $intranet_tmpl = "/usr/local/koha/intranet/htdocs/intranet-tmpl";
-my $C4 = "/usr/local/koha/intranet/modules/C4";
-my $opac_cgi = "/usr/local/koha/opac/cgi-bin";
-my $opac_tmpl = "/usr/local/koha/opac/htdocs";
-
-#backup the Koha directory tree items that will be symlinked:
-sub backup_tree {
-`mv $intranet_cgi $intranet_cgi.bak`;
-`mv $intranet_tmpl $intranet_tmpl.bak`;
-`mv $C4 $C4.bak`;
-`mv $opac_cgi $opac_cgi.bak`;
-`mv $opac_tmpl $opac_tmpl.bak`;
+if (exists $opt{help}) {
+    print &lt;&lt;FIN;
+
+Create symbolic links between a Koha installation and a Koha CVS working
+directory.
+
+Usage: koha_symlinks.pl --install_dir=&lt;installation directory&gt;
+                        --working_dir=&lt;working directory&gt;
+                        [--no-backup]
+                        [--help]
+
+--install_dir: is the directory where Koha is installed. By default,
+  /usr/local/koha
+
+--working_dir: where you checked out Koha. No default.
+
+--no-backup: you really don't want to backup your installation directory
+
+--help: show this help
+
+FIN
+
+      exit(0);
+}
+
+$opt{install_dir} = exists $opt{install_dir}
+    ? $opt{install_dir}
+    : '/usr/local/koha';
+
+# Configurable Variables
+foreach my $option (qw/working_dir install_dir/) {
+  if (not exists $opt{$option}) {
+    die 'option "', $option, '" is mandatory', "\n";
+  }
+
+  if (not -d $opt{$option}) {
+    die '"', $opt{$option}, '" must be an existing directory', "\n";
+  }
+
+  if (not $opt{$option} =~ m{^/}) {
+    die '--', $option, ' must be an absolute path', "\n";
+  }
 }
 
-# create the symlinks to the CVS repository
-sub create_symlinks {
-`ln -s $cvs_root_dir $intranet_cgi`;
-`ln -s $cvs_root_dir/koha-tmpl/intranet-tmpl $intranet_tmpl`;
-`ln -s $cvs_root_dir/C4 $C4`;
-`ln -s $cvs_root_dir/opac $opac_cgi`;
-`ln -s $cvs_root_dir/koha-tmpl/opac-tmpl $opac_tmpl`;
+unless (exists $opt{'no-backup'}) {
+    my @directories = (
+        'intranet/cgi-bin',
+        'intranet/htdocs/intranet-tmpl',
+        'intranet/modules/C4',
+        'opac/cgi-bin',
+        'opac/htdocs',
+    );
+
+    foreach my $directory (map {$opt{install_dir}.'/'.$_} @directories) {
+        system(
+            'mv',
+            $directory,
+            $directory.'.bak'
+        );
+    }
 }
-backup_tree;
-create_symlinks;</programlisting>
+
+system(
+    'ln',
+    '-s',
+    $opt{working_dir},
+    $opt{install_dir}.'/intranet/cgi-bin'
+);
+
+system(
+    'ln',
+    '-s',
+    $opt{working_dir}.'/koha-tmpl/intranet-tmpl',
+    $opt{install_dir}.'/intranet/htdocs/intranet-tmpl'
+);
+
+system(
+    'ln',
+    '-s',
+    $opt{working_dir}.'/C4',
+    $opt{install_dir}.'/intranet/modules/C4'
+);
+
+system(
+    'ln',
+    '-s',
+    $opt{working_dir}.'/opac',
+    $opt{install_dir}.'/opac/cgi-bin'
+);
+
+system(
+    'ln',
+    '-s',
+    $opt{working_dir}.'/koha-tmpl/opac-tmpl',
+    $opt{install_dir}.'/opac/htdocs'
+);
+</programlisting>
     </section>
   </section>
 
@@ -357,7 +460,7 @@
     when new features are added, the <database>Koha</database> database is
     subject to change. The <filename>updatedatbase</filename> script will
     modify your database to the latest version. It's located in the
-    <filename>koha/updater</filename> directory of the CVS repository. It is
+    <filename>koha/updater</filename> directory of the CVS working copy. It is
     strongly recommended that you backup your database before running the
     <filename>updatedatabase</filename> script. For more information on how to
     backup your system see that section in the <application>Koha</application>
@@ -365,10 +468,10 @@
 
     <para>In order to run this script you may need to export the environment
     variable so that Perl knows where <filename>Context.pm</filename> is. You
-    can do this by running:<literallayout>address@hidden export 
PERL5LIB="<emphasis>your_koha_cvsrepo</emphasis>"</literallayout>or
+    can do this by running:<literallayout>address@hidden export 
PERL5LIB="<emphasis>your_koha_cvs_working_copy</emphasis>"</literallayout>or
     the path to your modules (usually
     <filename>/usr/local/koha/intranet/modules</filename>). Alternatively you
-    can simply specify the path while executing the 
script:<literallayout>address@hidden perl -I 
<emphasis>your_koha_cvsrepo</emphasis> updatedatabase</literallayout></para>
+    can simply specify the path while executing the 
script:<literallayout>address@hidden perl -I 
<emphasis>your_koha_cvs_working_copy</emphasis> 
updatedatabase</literallayout></para>
 
     <para>You may see some messages that look like 
this:<literallayout>localhost:/build/koha/updater# perl -I /build/koha 
updatedatabase
 connected to your DB. Checking &amp; modifying it




reply via email to

[Prev in Thread] Current Thread [Next in Thread]