From d7a44f0702f62381b468d0738c9c923d8c56fa03 Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 19 Nov 2006 21:32:14 +0000 Subject: [PATCH] script to add a new xpdf version --- lib/pdf/inject-xpdf.pl | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 lib/pdf/inject-xpdf.pl diff --git a/lib/pdf/inject-xpdf.pl b/lib/pdf/inject-xpdf.pl new file mode 100755 index 0000000..6571080 --- /dev/null +++ b/lib/pdf/inject-xpdf.pl @@ -0,0 +1,41 @@ +#!/usr/bin/perl + +$filename = $ARGV[0]; + +$filename or die "no filename"; + +$directory = $filename; +$directory =~ s/.tar.gz$//g; + +mkdir("$directory"); +mkdir("$directory/tmp/"); + +chdir("$directory/tmp/") or die; +system("tar -zxvf ../../$filename") and die; +system("find -type f -exec mv {} .. \\;") and die; +chdir(".."); +system("find -type d -exec rmdir {} \\; 2> /dev/null"); +system("patch < ../xpdf-changes.patch") and die; +chdir(".."); +system("rm -f xpdf"); +system("ln -s $directory xpdf"); + +open(fi, ">switch"); + +print fi <