From 0b060f1a614a5e876aaf3531ef882cf866fc35ac Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Sun, 15 Feb 2015 14:34:42 -0800 Subject: [PATCH] Bugfix for running fetch in subdirs from a script --- libretro-fetch.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libretro-fetch.sh b/libretro-fetch.sh index 6985324d..3df94b73 100755 --- a/libretro-fetch.sh +++ b/libretro-fetch.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/libretro-config.sh