#!/bin/sh
DIR="${HOME}/.elkulator"
mkdir -p "${DIR}"
if ! [ -e "${DIR}/elk.cfg" ]; then
	cp -p /usr/pkg/share/examples/elkulator/elk.cfg "${DIR}/elk.cfg"
fi
if ! [ -e "${DIR}/roms" ]; then
	mkdir -p "${DIR}/roms"
	cp -Rp /usr/pkg/share/elkulator/roms/* "${DIR}/roms"
fi
exec "/usr/pkg/libexec/elkulator" "$@"
