1 |
>>>>> On Thu, 19 Nov 2020, Ulrich Müller wrote: |
2 |
|
3 |
> This implements the dosym command proposed for EAPI 8 (called dosym8 |
4 |
> because we cannot use the same name as the package-manager builtin). |
5 |
|
6 |
> "dosym -r <target> <link>" will expand the (apparent) path of <target> |
7 |
> relative to the (apparent) path of the directory containing <link>. |
8 |
> The main aim of this is to allow for an absolute path to be specified |
9 |
> as the link target, and the function will count path components and |
10 |
> convert it into a relative path. |
11 |
|
12 |
> Since we're inside ED at this point but the image will finally be |
13 |
> installed in EROOT, we don't try to resolve any pre-existing symlinks |
14 |
> in <target> or <link>. In other words, path expansion only looks at |
15 |
> the specified apparent paths, without touching any actual files in ED |
16 |
> or EROOT. |
17 |
|
18 |
Pushed to master. |
19 |
|
20 |
Some simple examples to demonstrate usage: |
21 |
|
22 |
dosym8 -r /bin/foo /usr/bin/foo |
23 |
- creates a relative symlink named ../../bin/foo |
24 |
|
25 |
dosym8 -r /usr/share/doc/foo-1 "${TEXMF}"/doc/latex/foo |
26 |
- creates a relative symlink named ../../../doc/foo-1 |
27 |
(with TEXMF="/usr/share/texmf-site") |
28 |
|
29 |
Enjoy! |
30 |
Ulrich |