summaryrefslogtreecommitdiffstats
path: root/abs/not_built/extra/sdlmame/sdlmame.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-12-01 18:26:09 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-12-01 18:26:22 (GMT)
commite2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37 (patch)
treebee3fe89f2988dd244e11791755e129aa8c03b14 /abs/not_built/extra/sdlmame/sdlmame.sh
parent8132c218cfc1f1acb1c6d12154e0d4ca075e77f2 (diff)
downloadlinhes_pkgbuild-e2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37.zip
linhes_pkgbuild-e2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37.tar.gz
linhes_pkgbuild-e2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37.tar.bz2
Mass move of uncompiled packages to abs_not_built.
The will sit here for a bit, and then will be removed completely if no one claims them.
Diffstat (limited to 'abs/not_built/extra/sdlmame/sdlmame.sh')
-rw-r--r--abs/not_built/extra/sdlmame/sdlmame.sh58
1 files changed, 58 insertions, 0 deletions
diff --git a/abs/not_built/extra/sdlmame/sdlmame.sh b/abs/not_built/extra/sdlmame/sdlmame.sh
new file mode 100644
index 0000000..38b4870
--- /dev/null
+++ b/abs/not_built/extra/sdlmame/sdlmame.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+# Create a variable equal to $HOME that will be used later in the ini creation
+home=('$HOME')
+
+if [ "$1" != "" ] && [ "$1" = "--newini" ]; then
+ echo "Rebuilding the ini file at $HOME/.mame/sdlmame.ini"
+ echo "Modify this file for permanent changes to your SDLMAME"
+ echo "options and paths before running SDLMAME again."
+ cd $HOME/.mame
+ if [ -e sdlmame.ini ]; then
+ echo "Your old ini file has been renamed to sdlmameini.bak"
+ mv sdlmame.ini sdlmameini.bak
+ fi
+ /usr/share/sdlmame/sdlmame \
+ -artpath "$home/.mame/artwork;artwork" \
+ -ctrlrpath "$home/.mame/ctrlr;ctrlr" \
+ -inipath $home/.mame/ini \
+ -rompath $home/.mame/roms \
+ -samplepath $home/.mame/samples \
+ -cfg_directory $home/.mame/cfg \
+ -comment_directory $home/.mame/comments \
+ -diff_directory $home/.mame/diff \
+ -input_directory $home/.mame/inp \
+ -memcard_directory $home/.mame/memcard \
+ -nvram_directory $home/.mame/nvram \
+ -snapshot_directory $home/.mame/snap \
+ -state_directory $home/.mame/sta \
+ -video opengl \
+ -createconfig
+elif [ ! -e $HOME/.mame ]; then
+ echo "Running SDLMAME for the first time..."
+ echo "Creating an ini file for SDLMAME at $HOME/.mame/sdlmame.ini"
+ echo "Modify this file for permanent changes to your SDLMAME"
+ echo "options and paths before running SDLMAME again."
+ mkdir $HOME/.mame
+ mkdir $HOME/.mame/{artwork,cfg,comments,ctrlr,diff,ini,inp,memcard,nvram,samples,snap,sta}
+ cd $HOME/.mame
+ /usr/share/sdlmame/sdlmame \
+ -artpath "$home/.mame/artwork;artwork" \
+ -ctrlrpath "$home/.mame/ctrlr;ctrlr" \
+ -inipath $home/.mame/ini \
+ -rompath $home/.mame/roms \
+ -samplepath $home/.mame/samples \
+ -cfg_directory $home/.mame/cfg \
+ -comment_directory $home/.mame/comments \
+ -diff_directory $home/.mame/diff \
+ -input_directory $home/.mame/inp \
+ -memcard_directory $home/.mame/memcard \
+ -nvram_directory $home/.mame/nvram \
+ -snapshot_directory $home/.mame/snap \
+ -state_directory $home/.mame/sta \
+ -video opengl \
+ -createconfig
+else
+ cd /usr/share/sdlmame
+ ./sdlmame "$@"
+fi