From 3ee02549dddc83d22f0f2ba874572dbba70b164c Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Sun, 15 Feb 2015 19:05:26 -0800 Subject: [PATCH] Add absolute/relative path bugfix to my scripts --- iKarith-libretro-build.sh | 5 ++++- iKarith-retroarch-build.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/iKarith-libretro-build.sh b/iKarith-libretro-build.sh index 327ef2ce..b2c892c2 100755 --- a/iKarith-libretro-build.sh +++ b/iKarith-libretro-build.sh @@ -8,7 +8,10 @@ WORKDIR=$(pwd) if [ "$BASE_DIR" = "$SCRIPT" ]; then BASE_DIR="$WORKDIR" else - BASE_DIR="$WORKDIR/$BASE_DIR" + if [[ "$0" != /* ]]; then + # Make the path absolute + BASE_DIR="$WORKDIR/$BASE_DIR" + fi fi . ${BASE_DIR}/iKarith-libretro-config.sh diff --git a/iKarith-retroarch-build.sh b/iKarith-retroarch-build.sh index d485e03c..4aa91169 100755 --- a/iKarith-retroarch-build.sh +++ b/iKarith-retroarch-build.sh @@ -8,7 +8,10 @@ WORKDIR=$(pwd) if [ "$BASE_DIR" = "$SCRIPT" ]; then BASE_DIR="$WORKDIR" else - BASE_DIR="$WORKDIR/$BASE_DIR" + if [[ "$0" != /* ]]; then + # Make the path absolute + BASE_DIR="$WORKDIR/$BASE_DIR" + fi fi . $BASE_DIR/iKarith-libretro-config.sh