X-Git-Url: http://git.i-scream.org/?a=blobdiff_plain;ds=inline;f=cgi-bin%2Flogo.cgi;fp=cgi-bin%2Flogo.cgi;h=837e1eb147eda5ffbd0222df8bab26cc557b7c6a;hb=a8233ee6515c3f035580bd7711f9484dbb71fbf8;hp=0000000000000000000000000000000000000000;hpb=dab5dbc565daac5f26e957130e49e29fc4d3cb6a;p=www.i-scream.org.git diff --git a/cgi-bin/logo.cgi b/cgi-bin/logo.cgi new file mode 100755 index 0000000..837e1eb --- /dev/null +++ b/cgi-bin/logo.cgi @@ -0,0 +1,25 @@ +#!/usr/local/bin/perl -w + +use strict; +$| = 1; + +# Directory to find images in +my($dir) = "/web/i-scream/nwww/logos"; +# Pattern to match images - remember to escape +my($pattern) = "\\.jpg\$"; + +# URL to images - must match $dir +my($url) = "http://nwww.i-scream.org/logos"; + +# Where the setbg command is +my($setbg) = "/web/i-scream/nwww.bin/setbg.pl"; + +# Code... +my($imagepath) = `$setbg -r -p \'$pattern\' -b echo -f \' \' $dir`; +chomp $imagepath; +$imagepath =~ s/$dir/$url/; + +print "Content-type: text/plain\n\n"; +print $imagepath; + +exit 0;