home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
linuxmafia.com 2016
/
linuxmafia.com.tar
/
linuxmafia.com
/
pub
/
skeptic
/
bibliography
/
admin
/
tar.cgi
< prev
Wrap
Text File
|
2009-08-26
|
552b
|
27 lines
#!/usr/bin/perl
# $rcs = ' $Id: tar.cgi,v 1.2 1998/06/20 04:00:04 fitz Exp $ ' ;
unshift(@INC, "../lib");
require 'config.pl';
chdir($bib::base_dir) || &error("Cannot chdir to $bib::base_dir");
$cmd = "/bin/tar cf - . | /bin/gzip -c";
open(CMD, "$cmd |") || &error("Cannot exec command '$cmd'");
print "Content-type: application/x-tar\n",
"Content-encoding: application/x-gzip\n",
"URI: http://www.csicop.org/bibliography/admin/bib.tar.gz\n",
"\n";
print <CMD>;
close CMD;
exit 0;
sub error
{
print "Content-type: text/html\n\n@_";
}