1# Generate tv_grab_ch_search from tv_grab_ch_search.in. This is to set the path to 2# the files in /usr/local/share/xmltv or wherever. 3# 4# The second argument is the share directory for the final 5# installation. 6# 7# $Id: tv_grab_ch_search.PL,v 1.2 2007/10/31 06:43:48 mattiasholmlund Exp $ 8# 9 10use IO::File; 11my $out = shift @ARGV; die "no output file given" if not defined $out; 12my $share_dir = shift @ARGV; 13die "no final share/ location given" if not defined $share_dir; 14my $in = 'grab/ch_search/tv_grab_ch_search.in'; 15my $in_fh = new IO::File "< $in" or die "cannot read $in: $!"; 16my $out_fh = new IO::File "> $out" or die "cannot write to $out: $!"; 17my $seen = 0; 18while (<$in_fh>) { 19 print $out_fh $_; 20} 21close $out_fh or die "cannot close $out: $!"; 22close $in_fh or die "cannot close $in: $!"; 23 24