summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation/visualboyadvance/files/playvisualboyadvance')
-rw-r--r--games-emulation/visualboyadvance/files/playvisualboyadvance18
1 files changed, 18 insertions, 0 deletions
diff --git a/games-emulation/visualboyadvance/files/playvisualboyadvance b/games-emulation/visualboyadvance/files/playvisualboyadvance
new file mode 100644
index 000000000000..e7a8848ed635
--- /dev/null
+++ b/games-emulation/visualboyadvance/files/playvisualboyadvance
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+PN=VisualBoyAdvance
+if ! [ -d ~/.${PN}/save ]; then
+ mkdir -p ~/.${PN}/save
+ cd ~/.${PN}
+ ln -s `which ${PN}` .
+ cp /usr/games/share/${PN}/${PN}.cfg .
+ mv ${PN}.cfg ${PN}.cfg.old
+ sed -e "s:#saveDir.*:saveDir ${HOME}/.${PN}/save:" \
+ -e "s:#captureDir.*:captureDir ${HOME}/.${PN}:" \
+ -e "s:#batteryDir.*:batteryDir ${HOME}/.${PN}/save:" \
+ ${PN}.cfg.old > ${PN}.cfg
+ rm -f ${PN}.cfg.old
+fi
+
+cd ~/.${PN}
+./${PN} $@