#!/nw/dev/perl/bin/perl -w

use strict;
use Getopt::Long;
use File::LinkTree;

sub usage {
    my $nm = $0;
    $nm =~ s,^.*/,,;
    print "usage: $nm [--unlink] [--mode 0777] [--ignore 'regex'] [--nop] [--verbose] <src> <dest>\n";
    exit 0;
}

my %opt;
GetOptions(\%opt, "mode=s", "unlink", "nop", "verbose", "ignore:s@") or usage();
usage() if @ARGV != 2;
$opt{src} = shift @ARGV;
$opt{dest} = shift @ARGV;
symlink_tree(%opt);

exit 0;
