aboutsummaryrefslogtreecommitdiff
path: root/dists/webos/mojo/start
blob: 55a7999502a2761e0c901025122233561c8300df (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
#!/bin/sh

# Get app directory
APPDIR=$(readlink -f $(dirname $0))

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

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

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

# Change into the screenshots directory so screenshots are saved there
cd /media/internal/ScummVM/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 $APPDIR/scummvmrc