#!/bin/sh # # This is a first very simple script to identify a given M$ executable # and launch it with the correct interpreter, either Dosbox or Wine so far. # # Author: Georg Hopp # Changelog: # 2017-02-07 Start work on this # function get_interpreter() { local EXE="$1" echo "$(basename "${EXE}")" >&2 case "$(file -b "${EXE}")" in *DOS*) local CONFIG="${HOME}/.dosbox/$(basename "${EXE}").conf" if [ ! \( -e "${CONFIG}" \) ] then cp "${HOME}/.dosbox/dosbox-SVN.conf" "${CONFIG}" fi echo -n "/usr/bin/dosbox -exit -conf ${CONFIG}" ;; *Windows*) echo -n "/usr/bin/wine";; esac } exec $(get_interpreter "$1") "$@" # vim: ft=sh ts=4 sw=4: