aboutsummaryrefslogtreecommitdiff
path: root/beyond-the-titanic
diff options
context:
space:
mode:
Diffstat (limited to 'beyond-the-titanic')
-rw-r--r--beyond-the-titanic39
1 files changed, 39 insertions, 0 deletions
diff --git a/beyond-the-titanic b/beyond-the-titanic
new file mode 100644
index 0000000..6a1ce22
--- /dev/null
+++ b/beyond-the-titanic
@@ -0,0 +1,39 @@
+#!/bin/sh
+# File: /usr/bin/beyond-the-titanic
+# Author: bgstack15
+# Startdate: 2019-03-31 17:55
+# Title: Beyond the Titanic
+# Package;
+# Purpose: Runs BEYOND from the correct location
+# History:
+# Usage: Normally called by /usr/share/applications/beyond-the-titanic.desktop
+# Reference:
+# https://stackoverflow.com/questions/2924697/how-does-one-output-bold-text-in-bash
+# Improve:
+# Documentation:
+# Dependencies:
+# file /etc/default/beyond-the-titanic
+# tput
+
+# load variables from defaults file
+test -r "/etc/default/beyond-the-titanic" && . /etc/default/beyond-the-titanic 1>/dev/null 2>&1
+test -z "${BEYOND_DIR}" && BEYOND_DIR=/usr/share/beyond-the-titanic
+
+# warn about screen size if not correct
+if test -z "${BEYOND_SILENT}" ;
+then
+ ___cols="$( tput cols 2>/dev/null )"
+ ___lines="$( tput lines 2>/dev/null )"
+ if "${___cols}" != "80" || "${___lines}" != "24" ;
+ then
+ printf "The game recommends using a terminal size of exactly 80 columns by 24 lines. Set BEYOND_SILENT=1 to suppress this message.\nPress enter to continue. "
+ read ___foo ;
+ fi
+fi
+
+# start game
+cd "${BEYOND_DIR}"
+./BEYOND
+
+# return terminal text to normal style
+tput sgr0
bgstack15