#!/bin/sh -e dir_prefix="%PREFIX%" dir_runtime="%RUNTIME%" dir_libdir="%LIBDIR%" dir_datadir="%DATADIR%" files=" $dir_libdir/nxengine/nx $dir_datadir/nxengine/font.ttf $dir_datadir/nxengine/smalfont.bmp $dir_datadir/nxengine/sprites.sif $dir_datadir/nxengine/tilekey.dat $dir_datadir/nxengine/Doukutsu.exe $dir_datadir/nxengine/data " mkdir -p "$dir_runtime" for file in $files; do [ ! -L "$dir_runtime/$(basename "$file")" ] && ln -sf -t "$dir_runtime" "$dir_prefix/$file" done cd "$dir_runtime" && ./nx