]>
Commit | Line | Data |
---|---|---|
7629744a | 1 | #!/bin/sh |
2 | set -eu | |
7b76fce1 ZJS |
3 | |
4 | # this is needed mostly because $DESTDIR is provided as a variable, | |
5 | # and we need to create the target directory... | |
6 | ||
dc25d2ad | 7 | mkdir -vp "$(dirname "${DESTDIR:-}$2")" |
c8475239 ZJS |
8 | if [ "$(dirname $1)" = . -o "$(dirname $1)" = .. ]; then |
9 | ln -vfs -T -- "$1" "${DESTDIR:-}$2" | |
7b76fce1 | 10 | else |
c8475239 | 11 | ln -vfs -T --relative -- "${DESTDIR:-}$1" "${DESTDIR:-}$2" |
7b76fce1 | 12 | fi |