#!/bin/bash
### BEGIN BOOT SCRIPT INFO
#Long-Name: Firebird
### END BOOT SCRIPT INFO
### BEGIN BOOT SCRIPT INSTALLATION DEFAULTS
#Launch-Mode: gui-only
### END BOOT SCRIPT INSTALLATION DEFAULTS
#
#Files required by this script:
#boot1.img.tns		boot ROM image
#config			emulator configuration directory
#flash			flash image
#

TMPDIR=/tmp/firebird_img_tmp

if [ -x "$TMPDIR" ]
then
	echo "another instance of firebird still running" >&2
	exit 1
fi

trap "rm -rf $TMPDIR" TERM HUP EXIT

mkdir "$TMPDIR"
ln -s "$PWD/boot1.img.tns" "$PWD/flash" "$TMPDIR"

XDG_CONFIG_HOME="$PWD/config" firebird-emu
