Skip to content

Commit

Permalink
Follow symlinks when loading libs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldfallen committed Aug 25, 2015
1 parent f9f0a48 commit 81612cb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
9 changes: 8 additions & 1 deletion fetch.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#! /usr/bin/env bash

dot="$(cd "$(dirname "$0")"; pwd)"
if [[ "$OSTYPE" == *darwin* ]]; then
READLINK_CMD='greadlink'
else
READLINK_CMD='readlink'
fi

dot="$(cd "$(dirname "$([ -L "$0" ] && $READLINK_CMD -f "$0" || echo "$0")")"; pwd)"

source $dot/radar-base.sh

fetch;
12 changes: 11 additions & 1 deletion git-radar
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#! /usr/bin/env bash
#
# git-radar
#
# A heads up display for git

dot="$(cd "$(dirname "$0")"; pwd)"
if [[ "$OSTYPE" == *darwin* ]]; then
READLINK_CMD='greadlink'
else
READLINK_CMD='readlink'
fi

dot="$(cd "$(dirname "$([ -L "$0" ] && $READLINK_CMD -f "$0" || echo "$0")")"; pwd)"

if [[ -z $@ ]]; then
_git="\033[1;30mgit:(\033[0m"
Expand Down

0 comments on commit 81612cb

Please sign in to comment.