[BACK]Return to cannonball.sh.in CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / emulators / cannonball / files

File: [cvs.NetBSD.org] / pkgsrc / emulators / cannonball / files / cannonball.sh.in (download)

Revision 1.1, Wed Oct 23 00:21:26 2019 UTC (2 years, 11 months ago) by fox
Branch: MAIN
CVS Tags: pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, HEAD

Import of cannonball 0.3.20190924 as emulators/cannonball.

CannonBall is a program which allows you to play an enhanced version
of Yu Suzuki's seminal arcade racer, OutRun, on a variety of systems.

#!/bin/sh

if [ -n "${XDG_DATA_HOME}" ]; then
	CANNONBALL_DIR=${XDG_DATA_HOME}/cannonball
else
	CANNONBALL_DIR=${HOME}/.local/share/cannonball
fi

RESOURCE_DIR=${CANNONBALL_DIR}/res
ROMS_DIR=${CANNONBALL_DIR}/roms

mkdir -p "${CANNONBALL_DIR}" "${ROMS_DIR}"

if [ ! -f "${CANNONBALL_DIR}/config.xml" ]; then
    cp @PREFIX@/share/cannonball/conf/config.xml \
       "${CANNONBALL_DIR}"
fi

if [ ! -d "${RESOURCE_DIR}" ]; then
    mkdir -p "${RESOURCE_DIR}"
    cp @PREFIX@/share/cannonball/res/tilemap.bin \
       "${RESOURCE_DIR}"
    cp @PREFIX@/share/cannonball/res/tilepatch.bin \
       "${RESOURCE_DIR}"
fi

cd "${CANNONBALL_DIR}" && exec "@PREFIX@/libexec/cannonball" "$@"