summarylogtreecommitdiffstats
path: root/mame.sh
diff options
context:
space:
mode:
authorsL1pKn072019-03-14 16:20:41 +0100
committersL1pKn072019-03-14 16:20:41 +0100
commita48423f670840c511d2388034be2018a3ef778ae (patch)
treed852c6ef9eae7dcfba6be3af988595d24c7c2bf6 /mame.sh
parent164d0cba75ec0f2ebbef1f42bc5d190301586f32 (diff)
downloadaur-a48423f670840c511d2388034be2018a3ef778ae.tar.gz
think better, i've move the shared/config files from ~/.mame to ~/.config/mame and ~/.local/share/mame. now respect the XDG specs
Diffstat (limited to 'mame.sh')
-rw-r--r--mame.sh58
1 files changed, 33 insertions, 25 deletions
diff --git a/mame.sh b/mame.sh
index bd73f0a9f2e8..d02b93a0b191 100644
--- a/mame.sh
+++ b/mame.sh
@@ -2,11 +2,13 @@
mamelib=/usr/lib/mame/
mame_first_run() {
- echo "Creating an ini file for MAME at ~/.mame/mame.ini"
+ echo "Creating an ini file for MAME at ~/.config/mame/mame.ini"
+ echo "Config and shared files is stored into"
+ echo " ~/.config/mame and ~/.local/share/mame"
echo "Modify this file for permanent changes to your MAME"
echo "options and paths before running MAME again."
- cd -- ~/.mame || exit
+ cd -- ~/.config/mame || exit
if [ -e mame.ini ]; then
mv mame.ini mameini.bak || exit
@@ -18,37 +20,43 @@ mame_first_run() {
# it is run in future.
mame \
- -rompath '$HOME/.mame/roms;roms' \
- -hashpath '$HOME/.mame/hash;hash' \
- -samplepath '$HOME/.mame/samples' \
- -artpath '$HOME/.mame/artwork;artwork' \
- -ctrlrpath '$HOME/.mame/ctrlr;ctrlr' \
- -inipath '$HOME/.mame/ini' \
- -fontpath '$HOME/.mame/fonts;fonts' \
- -cheatpath '$HOME/.mame/cheat' \
- -crosshairpath '$HOME/.mame/crosshair' \
- -pluginspath '$HOME/.mame/plugins;plugins' \
- -languagepath '$HOME/.mame/language;language' \
- -swpath '$HOME/.mame/software;software' \
- -cfg_directory '$HOME/.mame/cfg' \
- -nvram_directory '$HOME/.mame/nvram' \
- -input_directory '$HOME/.mame/inp' \
- -state_directory '$HOME/.mame/sta' \
- -snapshot_directory '$HOME/.mame/snap' \
- -diff_directory '$HOME/.mame/diff' \
- -comment_directory '$HOME/.mame/comments' \
+ -rompath '$HOME/.local/share/mame/roms;roms' \
+ -hashpath '$HOME/.local/share/mame/hash;hash' \
+ -samplepath '$HOME/.local/share/mame/samples' \
+ -artpath '$HOME/.local/share/mame/artwork;artwork' \
+ -ctrlrpath '$HOME/.local/share/mame/ctrlr;ctrlr' \
+ -inipath '$HOME/.config/mame/ini' \
+ -fontpath '$HOME/.local/share/mame/fonts;fonts' \
+ -cheatpath '$HOME/.local/share/mame/cheat' \
+ -crosshairpath '$HOME/.local/share/mame/crosshair' \
+ -pluginspath '$HOME/.local/share/mame/plugins;plugins' \
+ -languagepath '$HOME/.local/share/mame/language;language' \
+ -swpath '$HOME/.local/share/mame/software;software' \
+ -cfg_directory '$HOME/.config/mame/cfg' \
+ -nvram_directory '$HOME/.local/share/mame/nvram' \
+ -input_directory '$HOME/.local/share/mame/inp' \
+ -state_directory '$HOME/.local/share/mame/sta' \
+ -snapshot_directory '$HOME/.local/share/mame/snap' \
+ -diff_directory '$HOME/.local/share/mame/diff' \
+ -comment_directory '$HOME/.local/share/mame/comments' \
-video opengl \
-noreadconfig -showconfig > mame.ini
}
if [ "$1" = "--newini" ]; then
echo "Running MAME for the first time..."
- if ! [ -e ~/.mame ]; then
- mkdir -- ~/.mame
+ if ! [ -e ~/.config/mame ]; then
+ mkdir -- ~/.config/mame
fi
+ if ! [ -e ~/.local/share/mame ]; then
+ mkdir -- ~/.local/share/mame
+ fi
+
(
- cd -- ~/.mame || exit
- mkdir -p roms hash samples artwork ctrlr ini fonts cheat crosshair plugins language software
+ cd -- ~/.config/mame || exit
+ mkdir -p ini
+ cd -- ~/.local/share/mame || exit
+ mkdir -p roms hash samples artwork ctrlr fonts cheat crosshair plugins language software
mame_first_run
) || exit
fi