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") and die;
21 system("ln -s $directory xpdf");
28 if test "x\$1" = "xstable";then
29 echo "Switching to stable version"
32 elif test "x\$1" = "xlatest";then
33 echo "Switching to latest version"
40 system("chmod a+x switch");