updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / sdlmess-svn / sdlmess.sh
blob40f957d5aea9adb119d0b71fa5929ac04871f235
1 #!/bin/sh
3 # Create a variable equal to $HOME that will be used later in the ini creation
4 home=('$HOME')
6 if [ "$1" != "" ] && [ "$1" = "--newini" ]; then
7 echo "Rebuilding the ini file at $HOME/.mess/mess.ini"
8 echo "Modify this file for permanent changes to your SDLMESS"
9 echo "options and paths before running SDLMESS again."
10 cd $HOME/.mess
11 if [ -e mess.ini ]; then
12 echo "Your old ini file has been renamed to mess.ini.bak"
13 mv mess.ini mess.ini.bak
15 /usr/share/sdlmess/sdlmess \
16 -artpath "$home/.mess/artwork;artwork" \
17 -ctrlrpath "$home/.mess/ctrlr;ctrlr" \
18 -hashpath "$home/.mess/hash;hash" \
19 -inipath $home/.mess/ini \
20 -rompath "$home/.mess/roms;$home/.mess/bios" \
21 -samplepath $home/.mess/samples \
22 -cfg_directory $home/.mess/cfg \
23 -comment_directory $home/.mess/comments \
24 -diff_directory $home/.mess/diff \
25 -input_directory $home/.mess/inp \
26 -memcard_directory $home/.mess/memcard \
27 -nvram_directory $home/.mess/nvram \
28 -snapshot_directory $home/.mess/snap \
29 -state_directory $home/.mess/sta \
30 -video opengl \
31 -createconfig
32 elif [ ! -e $HOME/.mess ]; then
33 echo "Running SDLMESS for the first time..."
34 echo "Creating an ini file for SDLMESS at $HOME/.mess/mess.ini"
35 echo "Modify this file for permanent changes to your SDLMESS"
36 echo "options and paths before running SDLMESS again."
37 mkdir $HOME/.mess
38 mkdir $HOME/.mess/{artwork,bios,cfg,cheat,comments,ctrlr,diff,hash,ini,input,memcard,nvram,roms,samples,snap,software,sta,tools}
39 cd $HOME/.mess
40 /usr/share/sdlmess/sdlmess \
41 -artpath "$home/.mess/artwork;artwork" \
42 -ctrlrpath "$home/.mess/ctrlr;ctrlr" \
43 -hashpath "$home/.mess/hash;hash" \
44 -inipath $home/.mess/ini \
45 -rompath "$home/.mess/roms;$home/.mess/bios" \
46 -samplepath $home/.mess/samples \
47 -cfg_directory $home/.mess/cfg \
48 -comment_directory $home/.mess/comments \
49 -diff_directory $home/.mess/diff \
50 -input_directory $home/.mess/inp \
51 -memcard_directory $home/.mess/memcard \
52 -nvram_directory $home/.mess/nvram \
53 -snapshot_directory $home/.mess/snap \
54 -state_directory $home/.mess/sta \
55 -video opengl \
56 -createconfig
57 else
58 cd /usr/share/sdlmess
59 ./sdlmess "$@"