aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-06-14 17:56:49 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-06-15 21:08:07 +0300
commitfc8c0e410697928d644f06dea772b51c3abc0e3f (patch)
treee136e0d5e3df77ef65818ea94fee1bdced9a074f /doc
parent87f97db9d5dbe2aefbeb6c49c4bb65aa3b8afbc7 (diff)
Add support for ln testscript builtin
Diffstat (limited to 'doc')
-rw-r--r--doc/testscript.cli39
1 files changed, 39 insertions, 0 deletions
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 <target-path> <link-path>
+ln [--no-cleanup] -s <target-path>... <dir>/
+\
+
+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}|
\