From fc8c0e410697928d644f06dea772b51c3abc0e3f Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 14 Jun 2017 17:56:49 +0300 Subject: Add support for ln testscript builtin --- doc/testscript.cli | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'doc') diff --git a/doc/testscript.cli b/doc/testscript.cli index 685915e..c039ec0 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -2342,6 +2342,45 @@ false Do nothing and terminate normally with the 1 exit code (indicating failure). + +\h#builtins-ln|\c{ln}| + +\ +ln [--no-cleanup] -s +ln [--no-cleanup] -s ... / +\ + +Create symbolic links to files and/or directories. The first form creates a +single target link at the specified path. The second form creates links to one +or more targets inside the specified directory. + +If the last argument does not end with a directory separator, then the first +synopsis is assumed where \c{ln} creates the symbolic link to \i{target-path} +at \i{link-path} failing if the \i{target-path} filesystem entry does not +exist, \i{link-path} filesystem entry already exists or more than two arguments +are specified. + +If the last argument ends with a directory separator, then the second synopsis +is assumed where \c{ln} creates one or more symbolic links to \i{target-path} +files or directories inside the \i{dir} directory as if by executing the +following command for each target: + +\ +ln -s target-path dir/target-name +\ + +Where \i{target-name} is the last path component in \i{target-path}. + +For both cases \c{ln} falls back to creating a hard link if symbolic link +creation is not supported. If hard link creation is not supported either, +then \c{ln} falls back to copying the content, recursively in case of a +directory target. + +Unless the --no-cleanup option is specified, created filesystem entries that +are inside the script working directory are automatically registered for +cleanup. + + \h#builtins-mkdir|\c{mkdir}| \ -- cgit v1.1