diff options
author | B. Watson <yalhcru@gmail.com> | 2011-02-20 00:32:48 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-02-28 09:42:04 -0600 |
commit | 2062bf16019ebbc0af74e2c58b6a574c418b3f0c (patch) | |
tree | 24ffc0ab529473ff5128cf75783d95a1d56f7193 /games/steem/steem.sh | |
parent | b3ea517f6e6241be714fa669c3c564c0574ca1f5 (diff) | |
download | slackbuilds-2062bf16019ebbc0af74e2c58b6a574c418b3f0c.tar.gz |
games/steem: Added (Freeware Atari STE Emulator)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'games/steem/steem.sh')
-rw-r--r-- | games/steem/steem.sh | 45 |
1 files changed, 45 insertions, 0 deletions
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 <<EOF > ~/.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 |