On 2018/05/03 20:18, Solene Rapenne wrote:
>
> Stuart Henderson writes:
>
> > On 2018/05/03 15:21, David CARLIER wrote:
> >> True it writes in the current folder, due to the original design of the
> >> game structure (meant to be packaged for gaming platform).
> >> Is this a blocker for pushing the port ?
> >
> > imho yes. at a minimum we could ship a wrapper that cd's somewhere sane
> > first.
>
> Something like this ?
>
> #!/bin/sh
> mkdir -p ~/.barony
> cd ~/.barony || ( echo "Can't cd into ~/.barony" ; exit 1 )
> ${LOCALBASE}/bin/barony $@
> cd $OLDPWD
pretty much; I'd exec rather than keep the shell hanging around (and no need to
cd back).