summaryrefslogtreecommitdiff
blob: e7a8848ed6354635c2b0116f0a3deba288aca5fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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} $@