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 --verbose < ../xpdf-changes.patch") and die;
21 system("ln -s $directory xpdf");
31 if test "x\$VERSION" = "x";then
32 select V in stable latest;do VERSION="$V";break;done
35 if test "x\$VERSION" = "xstable";then
36 echo "Switching to stable version"
39 elif test "x\$VERSION" = "xlatest";then
40 echo "Switching to latest version"
47 system("chmod a+x switch");