freebsd-ports/emulators/linux-ePSXe/files/linux-epsxe_install.in
Edwin Groothuis 58c6069b03 This is ePSXe, a Sony Playstation emulator (Linux binary).
PR:		ports/46240
Submitted by:	Jean-Yves Lefort <jylefort@brutele.be>
2003-01-12 02:47:35 +00:00

72 lines
1.4 KiB
Bash

#!/bin/sh
# linux-epsxe_install - linux-ePSXe user installation
#
# (c) 2002 Jean-Yves Lefort.
# All rights reserved.
EPSXE=@EPSXE@
SHAREDIR=@SHAREDIR@
PSEMUPRO_PLUGINS_DIR=@PSEMUPRO_PLUGINS_DIR@
PSEMUPRO_CFGBINS_DIR=@PSEMUPRO_CFGBINS_DIR@
PSEMUPRO_CFGFILES_DIR=@PSEMUPRO_CFGFILES_DIR@
USERDIR=$HOME/.linux-ePSXe
_mkdir () {
if [ ! -e $1 ]; then
echo "Creating directory $1"
mkdir -p $1
fi
}
_ln () {
if [ ! -e $2 ]; then
echo "Creating symlink $2"
ln -sf $1 $2
fi
}
_install () {
if [ ! -e $2 ]; then
echo "Copying $1 to $2"
install -m $3 $1 $2
fi
}
for d in \
$USERDIR \
$USERDIR/bios \
$USERDIR/cfg \
$USERDIR/cheats \
$USERDIR/memcards \
$USERDIR/patches \
$USERDIR/plugins \
$USERDIR/snap \
$USERDIR/sstates; do
_mkdir $d || exit $?
done
_ln $EPSXE $USERDIR/epsxe || exit $?
for f in \
keycodes.lst \
cheats/breath_of_fire_4_usa.cht \
cheats/chrono_cross_ntsc.cht \
cheats/tarzan_pal.cht; do
_ln $SHAREDIR/$f $USERDIR/$f || exit $?
done
for p in $PSEMUPRO_PLUGINS_DIR/*; do
[ -e $p ] || break
_ln $p $USERDIR/plugins/`basename $p` || exit $?
done
for c in $PSEMUPRO_CFGBINS_DIR/*; do
[ -e $c ] || break
_ln $c $USERDIR/cfg/`basename $c` || exit $?
done
for c in $PSEMUPRO_CFGFILES_DIR/*; do
[ -e $c ] || break
_install $c $USERDIR/cfg/`basename $c` 0644 || exit $?
done