3 # Create a variable equal to $HOME that will be used later in the ini creation
6 if [ "$1" != "" ] && [ "$1" = "--newini" ]; then
7 echo "Rebuilding the ini file at $HOME/.mame/sdlmame.ini"
8 echo "Modify this file for permanent changes to your SDLMAME"
9 echo "options and paths before running SDLMAME again."
11 if [ -e sdlmame.ini
]; then
12 echo "Your old ini file has been renamed to sdlmameini.bak"
13 mv sdlmame.ini sdlmameini.bak
15 /usr
/share
/sdlmame
/sdlmame \
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 \
31 elif [ ! -e $HOME/.mame
]; then
32 echo "Running SDLMAME for the first time..."
33 echo "Creating an ini file for SDLMAME at $HOME/.mame/sdlmame.ini"
34 echo "Modify this file for permanent changes to your SDLMAME"
35 echo "options and paths before running SDLMAME again."
37 mkdir
$HOME/.mame
/{artwork
,cfg
,comments
,ctrlr
,diff,ini
,inp
,memcard
,nvram
,samples
,snap
,sta
}
39 /usr
/share
/sdlmame
/sdlmame \
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 \