[LON-CAPA-cvs] cvs: doc /loncapafiles picins_check.piml

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Sun, 21 Sep 2008 00:35:59 -0000


raeburn		Sat Sep 20 20:35:59 2008 EDT

  Added files:                 
    /doc/loncapafiles	picins_check.piml 
  Log:
  For distributions using TeXLive packaging of LaTeX (currently Fedora 9), picins.sty (required by LON-CAPA) has to be installed, as it is not part of the distribution. 
  
  

Index: doc/loncapafiles/picins_check.piml
+++ doc/loncapafiles/picins_check.piml
<!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
	"http://lpml.sourceforge.net/DTD/piml.dtd">
<!-- picins_check.piml -->
<!-- Stuart Raeburn -->

<!-- $Id: picins_check.piml,v 1.1 2008/09/21 00:35:59 raeburn Exp $ -->

<!--

This file is part of the LearningOnline Network with CAPA (LON-CAPA).

LON-CAPA is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

LON-CAPA is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with LON-CAPA; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

/home/httpd/html/adm/gpl.txt

http://www.lon-capa.org/

-->

<piml>
<files>
<file>
<perlscript mode="fg" dist="fedora9">
    my $picinspath = '/usr/share/texmf/tex/latex/picins'; 
    my $file = 'picins.sty';
    if (!-e "$picinspath/$file") {
        if (!-d $picinspath) {
            my @parts=split('/',$picinspath);
            my $filepath;
            foreach my $part (@parts) {
                $filepath.= '/'.$part;
                if (!-d $filepath) {
                    mkdir($filepath,0755);
                }
            }
        }
        if (-d $picinspath) {
            system("/usr/bin/wget -O $picinspath/$file  http://www.ctan.org/get/macros/latex209/contrib/picins/picins.sty  1>/dev/null 2>/dev/null");
            die("/usr/bin/wget -O  http://www.ctan.org/get/macros/latex209/contrib/picins/picins.sty failed") if $?;
            if (-e $picinspath.'/'.$file) {
                system('/usr/bin/texconfig rehash  1>/dev/null 2>/dev/null');
                die("Can't run /usr/bin/texconfig rehash") if $?;
                system("/usr/bin/fmtutil-sys --missing  1>/dev/null 2>/dev/null");                print "$picinspath/$file created and /usr/bin/texconfig rehash ran successfully.\n";
            } else {
                die("Can't find $picinspath/$file");
            }
        } else {
            die("Can't find $picinspath") if $?;
        }
    } else {
        print "No action required - $picinspath/$file already exists.\n";
    }
</perlscript>
</file>
</files>
</piml>