projects
/
ikiwiki
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
web commit by JoshTriplett: Typo.
[ikiwiki]
/
pm_filter
1
#!/usr/bin/perl -i -p
2
3
BEGIN {
4
$prefix=shift;
5
$ver=shift;
6
$libdir=shift;
7
}
8
9
if (/INSTALLDIR_AUTOREPLACE/) {
10
$_=qq{my \$installdir="$prefix";};
11
}
12
elsif (/VERSION_AUTOREPLACE/) {
13
$_=qq{our \$version="$ver";};
14
}
15
elsif (/^use lib/) {
16
if (grep { $_ eq $libdir } @INC) {
17
$_="";
18
}
19
else {
20
$_="use lib '$libdir';\n";
21
}
22
}