Skip to content

Commit

Permalink
vcs_relative_path broke on MacOS X.
Browse files Browse the repository at this point in the history
  • Loading branch information
tlimoncelli@stackexchange.com committed Jul 3, 2015
1 parent f5eeffd commit eab0418
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/_blackbox_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ source "${0%/*}"/_stack_lib.sh
# Allow overriding gpg command
: "${GPG:=gpg}" ;

function physical_directory_of() {
local d=$(dirname "$1")
local f=$(basename "$1")
(cd "$d" && echo $(pwd -P)"/$f" )
}

# Set REPOBASE to the top of the repository
# Set VCS_TYPE to 'git', 'hg', 'svn' or 'unknown'
if which >/dev/null 2>/dev/null git && git rev-parse --show-toplevel >/dev/null 2>&1 ; then
Expand Down Expand Up @@ -52,6 +58,7 @@ else
REPOBASE="$(pwd)"
fi
export VCS_TYPE
export REPOBASE=$(physical_directory_of "$REPOBASE")
# FIXME: Verify this function by checking for .hg or .git
# after determining what we believe to be the answer.

Expand Down

0 comments on commit eab0418

Please sign in to comment.