Name

mk_stage — Install files or directories into staging area

Synopsis

MODULES="... core ..."

mk_stage SOURCE=source_path DEST=dest_path

mk_stage SOURCE=source_path DESTDIR=dest_dir

mk_stage DESTDIR=dest_dir sources...

Options

MODE=mode

Specifies the UNIX mode of the destination files or directories

DEPS=deps

Specifies additional dependencies of the destination files or directories other than the sources.

Description

Defines targets that copy one or more files or directories into the staging area. In the first form, a single file or directory is copied, with the dest_path specifying the complete destination path. In the second form, the dest_dir parameter specifies the directory into which the source will be copied; the name of the source will be preserved. In the third form, multiple sources are copied into dest_dir.

If a source is a directory, the entire directory will be copied recursively. If the source is within the source tree, any files or directories beginning with . will be exluded from the recursive copy. This is intended to avoid copying hidden source control directories such as .svn.

Examples

# Copy a single file or directory
mk_stage SOURCE=foobar.conf.example DEST=/etc/foobar.conf
mk_stage SOURCE=foobar.d.example DEST=/etc/foobar.d

# Copy a single file or directory, specifying destination directory
Source filename is preserved
mk_stage SOURCE=foobar.conf DESTDIR=/etc
mk_stage SOURCE=foobar.d DESTDIR=/etc

# Copy multiple files and directories to destination directory
Source filenames are preserved
mk_stage DESTDIR=/etc foo.conf bar.conf