2015-02-16 19:19:30 -08:00
|
|
|
#! /usr/bin/env bash
|
|
|
|
# vim: set ts=3 sw=3 noet ft=sh : bash
|
2011-11-02 16:27:23 +01:00
|
|
|
|
2015-02-22 23:58:58 -08:00
|
|
|
SCRIPT="${0#./}"
|
|
|
|
BASE_DIR="${SCRIPT%/*}"
|
|
|
|
WORKDIR="$PWD"
|
2013-05-19 11:17:25 +02:00
|
|
|
|
2015-02-22 23:58:58 -08:00
|
|
|
if [ "$BASE_DIR" = "$SCRIPT" ]; then
|
|
|
|
BASE_DIR="$WORKDIR"
|
|
|
|
else
|
|
|
|
if [[ "$0" != /* ]]; then
|
|
|
|
# Make the path absolute
|
|
|
|
BASE_DIR="$WORKDIR/$BASE_DIR"
|
|
|
|
fi
|
|
|
|
fi
|
2013-05-08 13:00:38 +02:00
|
|
|
|
2015-03-03 14:01:16 +01:00
|
|
|
. "$BASE_DIR/libretro-config.sh" config_platform
|
|
|
|
|
2013-05-08 13:00:38 +02:00
|
|
|
RARCH_DIR="$BASE_DIR/dist"
|
2013-05-19 11:17:25 +02:00
|
|
|
RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR"
|
2013-05-03 11:32:01 +02:00
|
|
|
|
2011-11-02 16:27:23 +01:00
|
|
|
if [ -z "$1" ]; then
|
2015-02-16 19:19:30 -08:00
|
|
|
LIBRETRO_DIR="/usr/local/lib/libretro"
|
2011-11-02 16:27:23 +01:00
|
|
|
else
|
2015-02-16 19:19:30 -08:00
|
|
|
LIBRETRO_DIR="$1"
|
2011-11-02 16:27:23 +01:00
|
|
|
fi
|
|
|
|
|
2014-09-16 09:51:23 +02:00
|
|
|
mkdir -p "$LIBRETRO_DIR"
|
2013-05-03 11:32:01 +02:00
|
|
|
for lib in "$RARCH_DIST_DIR"/*
|
2011-11-02 16:27:23 +01:00
|
|
|
do
|
2015-02-16 19:19:30 -08:00
|
|
|
if [ -f "$lib" ]; then
|
2015-02-22 23:58:58 -08:00
|
|
|
install -v -m 644 "$lib" "$LIBRETRO_DIR"
|
2015-02-16 19:19:30 -08:00
|
|
|
else
|
|
|
|
echo "Library $lib not found, skipping ..."
|
|
|
|
fi
|
2011-11-02 16:27:23 +01:00
|
|
|
done
|
|
|
|
|
2013-10-06 14:59:05 +02:00
|
|
|
for infofile in "$RARCH_DIR"/info/*.info
|
|
|
|
do
|
2015-02-16 19:19:30 -08:00
|
|
|
if [ -f "$infofile" ]; then
|
2015-02-22 23:58:58 -08:00
|
|
|
install -v -m 644 "$infofile" "$LIBRETRO_DIR"
|
2015-02-16 19:19:30 -08:00
|
|
|
fi
|
2013-10-06 14:59:05 +02:00
|
|
|
done
|
|
|
|
|