From dd8831faf1aad06b81b253540d99072048be74a7 Mon Sep 17 00:00:00 2001 From: Justin Dray Date: Thu, 22 Oct 2015 16:20:44 +0200 Subject: [PATCH] Fix for OS X installation --- install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index e55308c1..7f7223c3 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -BASH_IT="$(dirname "$(readlink -f "$0")")" +BASH_IT="$(cd "$(dirname "$0")" && pwd)" case $OSTYPE in darwin*) @@ -36,8 +36,7 @@ test -w "$HOME/$CONFIG_FILE" && cp -a "$HOME/$CONFIG_FILE" "$HOME/$CONFIG_FILE.bak" && echo -e "\033[0;32mYour original $CONFIG_FILE has been backed up to $CONFIG_FILE.bak\033[0m" -cp "$BASH_IT/template/bash_profile.template.bash" "$HOME/$CONFIG_FILE" -sed -i "s|{{BASH_IT}}|$BASH_IT|" "$HOME/$CONFIG_FILE" +sed "s|{{BASH_IT}}|$BASH_IT|" "$BASH_IT/template/bash_profile.template.bash" > "$HOME/$CONFIG_FILE" echo -e "\033[0;32mCopied the template $CONFIG_FILE into ~/$CONFIG_FILE, edit this file to customize bash-it\033[0m"