File: updatedb.pl

package info (click to toggle)
radiuscontext 1.76-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 176 kB
  • ctags: 135
  • sloc: python: 1,120; perl: 57; sh: 50; makefile: 40
file content (24 lines) | stat: -rw-r--r-- 541 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl -w
#
#  Add data from a new set of detail files to database.
#  REQUIRES: parse.sh
#
#  Contributed by Richard A. Soderberg, June 1998

use Cwd;
require "find.pl";

&find('.');

sub wanted {
  if (/detail/ && /^.*\.gz$/) {
    print "Parsing $File::Find::name... ";
    system('/usr/local/etc/radiusContext/samples/parse.sh',
      "$File::Find::name");
    print "and...";
    $newname = $File::Find::name;
    $newname =~ s/detail/parsed_etail/g;
    system('mv',"$File::Find::name","$newname");
    print "done.\n";
  }
}