Fixing physical_directory_of function for cases when target directory lives in root. (#194)

This commit is contained in:
Robert Taylor
2017-05-29 23:00:06 +01:00
committed by Tom Limoncelli
parent d81cc6653f
commit 3e60c0c80e

View File

@@ -28,7 +28,7 @@ source "${0%/*}"/_stack_lib.sh
function physical_directory_of() { function physical_directory_of() {
local d=$(dirname "$1") local d=$(dirname "$1")
local f=$(basename "$1") local f=$(basename "$1")
(cd "$d" && echo "$(pwd -P)/$f" ) (cd "$d" && echo "$(pwd -P | sed 's/\/$//')/$f" )
} }
# Set REPOBASE to the top of the repository # Set REPOBASE to the top of the repository