projects
/
chef.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Allow planet redirector to handle any links under the webroot
[chef.git]
/
cookbooks
/
planet
/
templates
/
default
/
apache-latest-planet-filename.erb
1
#!/usr/bin/perl
2
3
# DO NOT EDIT - This file is being maintained by Chef
4
5
use strict;
6
use warnings;
7
8
use Cwd qw(abs_path);
9
10
$| = 1;
11
12
while (my $path = <STDIN>)
13
{
14
chomp $path;
15
16
my $file = abs_path("/store/planet${path}");
17
18
if ($file && $file =~ m|/store/planet/| && -f $file)
19
{
20
print "${file}\n";
21
}
22
else
23
{
24
print "NULL\n";
25
}
26
}