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); } } } else { chmod(0755,$picinspath); } if (-d $picinspath) { 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"); die("/usr/bin/wget -O $srcurl failed") if $?; chmod(0644, "$picinspath/$file"); if (-e $picinspath.'/'.$file) { if ('' eq 'ubuntu16' || '' eq 'ubuntu18') { system('/usr/bin/mktexlsr'); die("Can't run /usr/bin/mktexlsr") if $?; print "$picinspath/$file created and /usr/bin/mktexlsr ran successfully.\n"; } else { 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"; } chmod(0644,"$picinspath/$file"); } else { die("Can't find $picinspath/$file"); } } else { die("Can't find $picinspath") if $?; } } else { chmod(0755,$picinspath); chmod(0644,"$picinspath/$file"); print "No action required - $picinspath/$file already exists.\n"; } 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.