3 ###APPAUTHOR: xiaoranzzz
4 ###APPDATE: 2009-06-25 05:12:10
12 #ENV variable MUST be defined somewhere,
13 #FOR perl to search modules from,
15 use lib
$ENV{XR_PERL_MODULE_DIR
};
17 use MyPlace
::Script
::Usage qw
/help_required help_even_empty/;
18 exit 0 if(help_required
($0,@ARGV));
19 #exit 0 if(help_even_empty($0,@ARGV));
21 use File
::Temp qw
/tempfile/;
25 die("File not exist:$fdz\n") unless(-r
$fdz);
27 my ($fh,$fd)=tempfile
("fdz.XXXXXXXXX",DIR
=>'/tmp');
28 print STDERR
"Decompressing $fdz to $fd...";
29 open FI
,"-|","bzcat",$fdz or die("$!\n");
35 system("bootfd",$fd,@ARGV);
38 print STDERR
"Compressing $fd to $fdz...\n";
39 open FI
,"-|","bzip2","-vc",$fd or die("$!\n");
40 open FO
,">",$fdz or die("$!\n");
45 unlink $fd or die("$!\n");