mirror of
https://github.com/libretro/libretro-super
synced 2024-12-01 04:03:00 +00:00
libretro-fetch.sh should now run anywhere
This commit is contained in:
parent
e3f874cb11
commit
0ada2ddbd1
@ -1,7 +1,27 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# vi: sw=3 ts=3 et
|
# vi: sw=3 ts=3 et
|
||||||
|
|
||||||
. ./libretro-config.sh
|
# BSDs don't have readlink -f
|
||||||
|
read_link()
|
||||||
|
{
|
||||||
|
TARGET_FILE="${1}"
|
||||||
|
cd "`dirname "${TARGET_FILE}"`"
|
||||||
|
TARGET_FILE="`basename "${TARGET_FILE}"`"
|
||||||
|
|
||||||
|
while [ -L "${TARGET_FILE}" ]; do
|
||||||
|
TARGET_FILE="`readlink "${TARGET_FILE}"`"
|
||||||
|
cd "`dirname "${TARGET_FILE}"`"
|
||||||
|
TARGET_FILE="`basename "${TARGET_FILE}"`"
|
||||||
|
done
|
||||||
|
|
||||||
|
PHYS_DIR="`pwd -P`"
|
||||||
|
RESULT="${PHYS_DIR}/${TARGET_FILE}"
|
||||||
|
echo ${RESULT}
|
||||||
|
}
|
||||||
|
SCRIPT="`read_link "$0"`"
|
||||||
|
BASE_DIR="`dirname "${SCRIPT}"`"
|
||||||
|
|
||||||
|
. ${BASE_DIR}/libretro-config.sh
|
||||||
|
|
||||||
WORKDIR=$(pwd)
|
WORKDIR=$(pwd)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user