Skip to content

relpath.sh script produces wrong results

Summary

The mk/relpath.sh script is supposed to be a shell implementation of realpath, but produces wrong results.

Steps to reproduce

$ ./mk/relpath.sh /usr/lib/ghc/lib /usr/lib/ghc-doc
..-doc

Expected behavior

$ realpath --relative-to=/usr/lib/ghc/lib /usr/lib/ghc-doc
../../ghc-doc
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information