From d801167ddd825a195ea8283f15283a3e691658d2 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Tue, 21 Aug 2012 13:35:38 +1200 Subject: [PATCH] Use perl abs_path instead of readlink -f, since it should work on both OS X and Linux --- lib/git/shell_shortcuts.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/git/shell_shortcuts.sh b/lib/git/shell_shortcuts.sh index 51d71af..e93311d 100644 --- a/lib/git/shell_shortcuts.sh +++ b/lib/git/shell_shortcuts.sh @@ -79,7 +79,8 @@ EOF # Set numbered file shortcut in variable local e=1 for file in $($_ll_sys_command); do - export $git_env_char$e="$(readlink -f $file)" + # Use perl abs_path instead of readlink -f, since it should work on both OS X and Linux + export $git_env_char$e="$(perl -e 'use Cwd "abs_path"; print abs_path(shift)' $file)" if [ "${scmbDebug:-}" = "true" ]; then echo "Set \$$git_env_char$e => $file"; fi let e++ done