5 $filename or die "no filename";
7 $directory = $filename;
8 $directory =~ s/.tar.gz$//g;
11 mkdir("$directory/tmp/");
13 chdir("$directory/tmp/") or die;
14 system("tar -zxvf ../../$filename") and die;
15 system("find -type f -exec mv {} .. \\;") and die;
17 system("find -type d -exec rmdir {} \\; 2> /dev/null");
18 system("patch < ../xpdf-changes.patch");
21 system("ln -s $directory xpdf");
31 if test "x\$VERSION" = "x";then
32 select V in stable latest;do VERSION="\$V";break;done
36 if test "x\$VERSION" = "xstable";then
37 echo "Switching to stable version"
40 elif test "x\$VERSION" = "xlatest";then
41 echo "Switching to latest version"
48 system("chmod a+x switch");
50 $c = 'find '.$directory.' \( -name "*.cc" -or -name "*.h" -or -name "*.c" \) -exec cp {} {}.orig \;';