aboutsummaryrefslogtreecommitdiff
path: root/dists/webos/mojo/start
blob: 3bdb9a59d89e62c9f306a2dd1080c999d1eb5c70 (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
26
27
28
29
30
31
32
#!/bin/sh

# Setup directories
APPDIR=$(readlink -f $(dirname $0))
SCUMMVMDIR=/media/internal/ScummVM


# Create the initial ScummVM directory structure
mkdir -p $SCUMMVMDIR/Games
mkdir -p $SCUMMVMDIR/Saves
mkdir -p $SCUMMVMDIR/Screenshots
mkdir -p $SCUMMVMDIR/Themes
mkdir -p $SCUMMVMDIR/Extras
mkdir -p $SCUMMVMDIR/Plugins

# Install default configuration file if not already present
if [ ! -f $SCUMMVMDIR/scummvmrc ]
then
    cp $APPDIR/scummvmrc-default $SCUMMVMDIR/scummvmrc
fi

# Copy themes to theme directory
cp -f $APPDIR/share/scummvm/*.zip $SCUMMVMDIR/Themes

# Change into the screenshots directory so screenshots are saved there
cd $SCUMMVMDIR/Screenshots

# Set library path so the app finds its custom shared libraries
export LD_LIBRARY_PATH=$APPDIR/lib

# Run the game
exec $APPDIR/bin/scummvm -c $SCUMMVMDIR/scummvmrc