version 1.16, 2012/07/24 04:20:50
|
version 1.33, 2017/03/29 20:48:25
|
Line 32 http://www.lon-capa.org/
|
Line 32 http://www.lon-capa.org/
|
<piml> |
<piml> |
<files> |
<files> |
<file> |
<file> |
<perlscript mode="fg" dist="fedora9 fedora10 fedora11 fedora12 fedora13 fedora14 fedora15 fedora16 fedora17 rhes6 scientific6 centos6 sles11 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 debian5 debian6 ubuntu8 ubuntu10"> |
<perlscript mode="fg" dist="fedora9 fedora10 fedora11 fedora12 fedora13 fedora14 fedora15 fedora16 fedora17 fedora18 fedora19 fedora20 fedora21 fedora22 fedora 23 fedora24 fedora25 rhes6 scientific6 centos6 rhes7 scientific7 centos7 sles11 sles12 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2 debian5 debian6 ubuntu8 ubuntu10 ubuntu12 ubuntu14 ubuntu16"> |
my $picinspath = '/usr/share/texmf/tex/latex/picins'; |
my $picinspath = '/usr/share/texmf/tex/latex/picins'; |
my $file = 'picins.sty'; |
my $file = 'picins.sty'; |
if (!-e "$picinspath/$file") { |
if (!-e "$picinspath/$file") { |
Line 45 http://www.lon-capa.org/
|
Line 45 http://www.lon-capa.org/
|
mkdir($filepath,0755); |
mkdir($filepath,0755); |
} |
} |
} |
} |
|
} else { |
|
chmod(0755,$picinspath); |
} |
} |
if (-d $picinspath) { |
if (-d $picinspath) { |
my $srcurl = 'http://install.loncapa.org/ctan/tex-archive/macros/latex209/contrib/picins/picins.sty'; |
my $srcurl = 'http://install.loncapa.org/ctan/tex-archive/macros/latex209/contrib/picins/picins.sty'; |
system("/usr/bin/wget -O $picinspath/$file $srcurl 1>/dev/null 2>/dev/null"); |
system("/usr/bin/wget -O $picinspath/$file $srcurl 1>/dev/null 2>/dev/null"); |
die("/usr/bin/wget -O $srcurl failed") if $?; |
die("/usr/bin/wget -O $srcurl failed") if $?; |
|
chmod(0644, "$picinspath/$file"); |
if (-e $picinspath.'/'.$file) { |
if (-e $picinspath.'/'.$file) { |
system('/usr/bin/texconfig rehash 1>/dev/null 2>/dev/null'); |
system('/usr/bin/texconfig rehash 1>/dev/null 2>/dev/null'); |
die("Can't run /usr/bin/texconfig rehash") if $?; |
die("Can't run /usr/bin/texconfig rehash") if $?; |
print "$picinspath/$file created and /usr/bin/texconfig rehash ran successfully.\n"; |
print "$picinspath/$file created and /usr/bin/texconfig rehash ran successfully.\n"; |
|
chmod(0644,"$picinspath/$file"); |
} else { |
} else { |
die("Can't find $picinspath/$file"); |
die("Can't find $picinspath/$file"); |
} |
} |
Line 61 http://www.lon-capa.org/
|
Line 65 http://www.lon-capa.org/
|
die("Can't find $picinspath") if $?; |
die("Can't find $picinspath") if $?; |
} |
} |
} else { |
} else { |
|
chmod(0755,$picinspath); |
|
chmod(0644,"$picinspath/$file"); |
print "No action required - $picinspath/$file already exists.\n"; |
print "No action required - $picinspath/$file already exists.\n"; |
} |
} |
</perlscript> |
</perlscript> |