From: kramm Date: Sun, 19 Nov 2006 21:32:14 +0000 (+0000) Subject: script to add a new xpdf version X-Git-Tag: release-0-8-0~131 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=d7a44f0702f62381b468d0738c9c923d8c56fa03;p=swftools.git script to add a new xpdf version --- 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 <