DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (495129e490bc)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#!/usr/bin/perl

my $lxr_dir = '.';

if ($#ARGV <= 0) {
print "Syntax: $0 tree path/to/tree [prefix]
";
exit;
}

my ($tree, $path, $prefix);
$tree = $ARGV[0];
$path = $ARGV[1];
$prefix = $ARGV[2] if $#ARGV > 1;

die "invalid tree name" if $tree =~ /[\s:]/;

open LXRCONF, ">> $lxr_dir/lxr.conf";
print LXRCONF "sourceroot: $tree $path
";
if (defined $prefix) {
 print LXRCONF "sourceprefix: $tree $prefix
";
}
chdir($lxr_dir);
symlink('.', $tree);
close LXRCONF;