freebsd-ports/emulators/linux-ePSXe/files/epsxe-install.in
Pav Lucistnik 5a25befeea - Update to 1.6.0
PR:		ports/59670
Submitted by:	Jean-Yves Lefort <jylefort@brutele.be> (maintainer)
2003-12-26 23:01:39 +00:00

72 lines
1.4 KiB
Bash

#!/bin/sh
# epsxe-install - ePSXe user installation
#
# (c) 2002-2003 Jean-Yves Lefort.
# All rights reserved.
EPSXE=@EPSXE@
DATADIR=@DATADIR@
PSEMUPRO_PLUGINS_DIR=@PSEMUPRO_PLUGINS_DIR@
PSEMUPRO_CFGBINS_DIR=@PSEMUPRO_CFGBINS_DIR@
PSEMUPRO_CFGFILES_DIR=@PSEMUPRO_CFGFILES_DIR@
USERDIR=$HOME/.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 $DATADIR/$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