=head1 NAME
aa-hiercopy - Copy a directory structure recursively
=head1 SYNOPSIS
B<aa-hiercopy> [B<-D>] [B<-O> I<FILE|FD>] I<SOURCE> I<DESTINATION>
=head1 OPTIONS
=over
=item B<-D, --double-output>
Enable double-output mode. Instead of using stdout for regular output, and
stderr for warnings and errors, everything is sent both to stdout and stderr.
This is intended to redirect stderr to a log file, so full output can be both
shown on console and logged.
B<Deprecation warning:> Note that this option has been deprecated and will be
removed in the next version; You should use B<--log-file> instead.
=item B<-h, --help>
Show help screen and exit.
=item B<-O, --log-file> I<FILE|FD>
Will duplicate all output (everything written to stdout or stderr) to the given
file or file descriptor. I<FILE|FD> can either be a (previously opened for
writing) file descriptor (must be > 2), or a file which will then be opened in
append mode.
=item B<-V, --version>
Show version information and exit.
=back
=head1 DESCRIPTION
B<aa-hiercopy>(1) recursively copies I<SOURCE> to I<DESTINATION>, which is
created if it doesn't exist. The permissions are preserved. The owner and group
are preserved if the user is the superuser.
Much like B<s6-hiercopy> this is simply a wrapper around a function of skalibs,
therefore it behaves very much the same. A notable difference however, is that
if I<SOURCE> is a symlink, B<aa-hiercopy>(1) will instead resolve it, whereas
B<s6-hiercopy> would simply copy the symlink itself.
=head1 RETURN CODES
Return codes are somewhat unified inside B<anopa>. Odd return codes represent
fatal errors, and are detailled in B<anopa-rc>(1)
Possible even return codes for B<aa-hiercopy>(1) are:
=over
=item B<2>
Failed to lstat I<SOURCE>
=item B<4>
Failed to resolve symlink I<SOURCE>
=item B<6>
Error during the copy
=back