summaryrefslogtreecommitdiff
path: root/pm_filter
diff options
context:
space:
mode:
Diffstat (limited to 'pm_filter')
-rwxr-xr-xpm_filter16
1 files changed, 16 insertions, 0 deletions
diff --git a/pm_filter b/pm_filter
new file mode 100755
index 000000000..89449bd91
--- /dev/null
+++ b/pm_filter
@@ -0,0 +1,16 @@
+#!/usr/bin/perl -i -p
+
+BEGIN {
+ $prefix=shift;
+ $ver=shift;
+}
+
+if (/INSTALLDIR_AUTOREPLACE/) {
+ $_=qq{my \$installdir="$prefix";};
+}
+elsif (/VERSION_AUTOREPLACE/) {
+ $_=qq{our \$version="$ver";};
+}
+elsif (/^use lib/) {
+ $_="";
+}