Add absolute/relative path bugfix to my scripts

This commit is contained in:
T. Joseph Carter 2015-02-15 19:05:26 -08:00
parent a9bda03302
commit 3ee02549dd
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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