updated on Fri Jan 13 00:14:41 UTC 2012
[aur-mirror.git] / wolfmame / wolfmame.sh
blobb99a03c4452cb9c0bd4ee0da8f05f71ade75e14b
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/.mame/mame.ini"
8 echo "Modify this file for permanent changes to your WolfMAME"
9 echo "options and paths before running WolfMAME again."
10 cd $HOME/.mame
11 if [ -e mame.ini ]; then
12 echo "Your old ini file has been renamed to mameini.bak"
13 mv mame.ini mameini.bak
15 /usr/share/wolfmame/wolfmame \
16 -artpath "$home/.mame/artwork;artwork" \
17 -ctrlrpath "$home/.mame/ctrlr;ctrlr" \
18 -inipath $home/.mame/ini \
19 -rompath $home/.mame/roms \
20 -samplepath $home/.mame/samples \
21 -cfg_directory $home/.mame/cfg \
22 -comment_directory $home/.mame/comments \
23 -diff_directory $home/.mame/diff \
24 -input_directory $home/.mame/inp \
25 -memcard_directory $home/.mame/memcard \
26 -nvram_directory $home/.mame/nvram \
27 -snapshot_directory $home/.mame/snap \
28 -state_directory $home/.mame/sta \
29 -video opengl \
30 -createconfig
31 elif [ ! -e $HOME/.mame ]; then
32 echo "Running WolfMAME for the first time..."
33 echo "Creating an ini file for WolfMAME at $HOME/.mame/mame.ini"
34 echo "Modify this file for permanent changes to your WolfMAME"
35 echo "options and paths before running WolfMAME again."
36 mkdir $HOME/.mame
37 mkdir $HOME/.mame/{artwork,cfg,comments,ctrlr,diff,ini,inp,memcard,nvram,samples,snap,sta}
38 cd $HOME/.mame
39 /usr/share/wolfmame/wolfmame \
40 -artpath "$home/.mame/artwork;artwork" \
41 -ctrlrpath "$home/.mame/ctrlr;ctrlr" \
42 -inipath $home/.mame/ini \
43 -rompath $home/.mame/roms \
44 -samplepath $home/.mame/samples \
45 -cfg_directory $home/.mame/cfg \
46 -comment_directory $home/.mame/comments \
47 -diff_directory $home/.mame/diff \
48 -input_directory $home/.mame/inp \
49 -memcard_directory $home/.mame/memcard \
50 -nvram_directory $home/.mame/nvram \
51 -snapshot_directory $home/.mame/snap \
52 -state_directory $home/.mame/sta \
53 -video opengl \
54 -createconfig
55 else
56 cd /usr/share/wolfmame
57 ./wolfmame "$@"