updated git and svn scripts
[xrzperl.git] / urlrule_host_get
blob3919cd35b0c08627ed02c82b44434a1df965ae00
1 #!/usr/bin/perl -w
2 use strict;
4 #ENV variable MUST be defined somewhere,
5 #FOR perl to search modules from,
6 #OR nothing will work
7 use lib $ENV{XR_PERL_MODULE_DIR};
9 use MyPlace::URLRule::HostMap qw/%HOST_MAP get_task valid_hostname add_host get_hosts/;
11 use Data::Dumper;print STDERR Dumper(\%HOST_MAP);
13 my ($host,@ids)=@ARGV;
14 die("Usage:$0 (hostname) (id) [id...]\n") unless(@ids);
16 die("Invalid hostname, not in the map.\n") unless(valid_hostname($host));
18 foreach(@ids) {
19 my ($url,$level) = get_task($host,$_);
20 print STDERR "$url $level\n";
21 system("urlrule_get",$url,$level) == 0;