From 2062bf16019ebbc0af74e2c58b6a574c418b3f0c Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 20 Feb 2011 00:32:48 -0600 Subject: games/steem: Added (Freeware Atari STE Emulator) Signed-off-by: Robby Workman --- games/steem/steem.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 games/steem/steem.sh (limited to 'games/steem/steem.sh') diff --git a/games/steem/steem.sh b/games/steem/steem.sh new file mode 100644 index 0000000000..6786153020 --- /dev/null +++ b/games/steem/steem.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +# Wrapper script for steem. It's a windows app ported to linux, which +# *insists* on being able to write to the directory where the binary +# lives (even just running "steem --help" segfaults if there's no write +# permission!) +# This script makes it behave in a more unix-friendly way. + +# TODO: find a better way to do this. +# Currently, the script at least handles spaces and punctuation +# in the filenames... but it's kinda ugly the way it works. +# ...especially the "echo exec ... | exec sh" + +ARGS= + +if [ ! -d ~/.steem ]; then + mkdir -p ~/.steem + ln -s /usr/share/steem/patches ~/.steem/patches + ln -s /usr/share/steem/tos ~/.steem/tos + ln -s /usr/libexec/steem.bin ~/.steem + cat < ~/.steem/steem.ini +[Machine] +ROM_File=$HOME/.steem/tos/tos102.img + +[Main] +DebugBuild=0 + +[Update] +CurrentVersion=3.2 +EOF +fi + +while [ -n "$1" ]; do + if [ -e "$1" ]; then + ARG="$( readlink -f "$1" )" + else + ARG="$1" + fi + echo $ARG + ARGS="$ARGS '$( echo "$ARG" | sed "s/'/'\\\\''/g" )'" + shift +done + +cd ~/.steem +echo exec ./steem.bin $ARGS | exec sh -- cgit v1.2.3