From 3e0fffd67503d6bdc9bb46a7d670a105e442a481 Mon Sep 17 00:00:00 2001 From: phenonymous <29523105+phenonymous@users.noreply.github.com> Date: Tue, 27 Nov 2018 11:09:12 +0100 Subject: [PATCH] Add support to show all themes without applying --- test/print-themes.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 test/print-themes.sh diff --git a/test/print-themes.sh b/test/print-themes.sh old mode 100644 new mode 100755 index d75b2ec..3813783 --- a/test/print-themes.sh +++ b/test/print-themes.sh @@ -245,15 +245,15 @@ set_gogh() { url="https://raw.githubusercontent.com/Mayccoll/Gogh/master/themes/$1" # Evaluate if Gogh was called from local source - i.e cloned repo - SCRIPT_PATH="$( cd "../$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - if [ -e "$SCRIPT_PATH/themes/$1" ]; then - eval "$SCRIPT_PATH/themes/$1" + SCRIPT_PATH="$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")" + if [[ -e "${SCRIPT_PATH}/themes/$1" ]]; then + eval "$(<"${SCRIPT_PATH}/themes/$1")" else - if [ "$(uname)" = "Darwin" ]; then + if [[ "$(uname)" = "Darwin" ]]; then # OSX ships with curl - eval "$(curl -so- "${url}")" + (eval "$(curl -so- "${url}")") else - eval "$(wget -qO- "${url}")" + (eval "$(wget -qO- "${url}")") fi fi }