summaryrefslogtreecommitdiff
path: root/games/epsxe/wrapper.epsxe
blob: af0adb9999b6b649b5693a1c7c40c45b6607e39f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

# This script has 2 reasons to exist.
# 1) Run the real executable, since it looks for the plugins in the same 
#    directory where it is located; therefore, the file structure given 
#    by the epsxe team must be preserved.
# 2) Check if the user's $HOME has a ".epsxe" directory. This is only a way 
#    to have links to the plugins directory, that was given write permissions
#    to the games group.

# Check for the $HOME/.epsxe dir.
if [ ! -d $HOME/.epsxe ]; then
  mkdir -p $HOME/.epsxe
  cd $HOME/.epsxe
    ln -s @INSTALLDIR@/cfg cfg
    ln -s @INSTALLDIR@/bios bios
    ln -s @INSTALLDIR@/cheats cheats
    ln -s @INSTALLDIR@/memcards memcards
    ln -s @INSTALLDIR@/plugins plugins
  cd -
fi

# Run the program
@INSTALLDIR@/epsxe