File:  [LON-CAPA] / doc / loncapafiles / picins_check.piml
Revision 1.10: download - view: text, annotated - select for diffs
Sat Jan 1 21:49:56 2011 UTC (11 years, 11 months ago) by raeburn
Branches: MAIN
CVS tags: version_2_10_0_RC2, HEAD
- Support for suse11.3

<!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
<!-- picins_check.piml -->
<!-- Stuart Raeburn -->

<!-- $Id: picins_check.piml,v 1.10 2011/01/01 21:49:56 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
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



<perlscript mode="fg" dist="fedora9 fedora10 fedora11 fedora12 fedora13 fedora14 rhes6 sles11 suse11.1 suse11.2 suse11.3 debian5 ubuntu8">
    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) {
        if (-d $picinspath) {
            system("/usr/bin/wget -O $picinspath/$file  1>/dev/null 2>/dev/null");
            die("/usr/bin/wget -O 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 $?;
                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";

FreeBSD-CVSweb <>