Consider this script.
#! /usr/bin/env bash mkdir -p target mkdir -p mydir/package/ touch mydir/package/file ln --symbolic mydir mylink file mylink stow --verbose --dir=./mylink --target=./target package file target/file
The output is
mylink: symbolic link to mydir LINK: file => ../mydir/package/file target/file: symbolic link to ../mydir/package/file
stow, it looks like this:
. ├── mydir │ └── package │ └── file ├── mylink -> mydir └── target
mylink, I expected it to look like this:
. ├── mydir │ └── package │ └── file ├── mylink -> mydir └── target └── file -> ../mylink/package/file
However, instead it looks like this:
. ├── mydir │ └── package │ └── file ├── mylink -> mydir └── target └── file -> ../mydir/package/file
It seems that the
stow command resolves the realpath of the package directory, so instead of pointing to
../mylink/package/file it points to
This makes sense for avoiding too much indirection, but it happens silently and may not always be desirable. Is there a way to work around this behavior?