From f5f462ae3cd8253edb7fb71a547cd1d6b2ac1ca7 Mon Sep 17 00:00:00 2001 From: Charadon Date: Sat, 24 Sep 2022 13:43:34 -0400 Subject: Fixed typo in launch.sh and added distribute script that creates tarball for distribution purposes. --- src/launch.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/launch.sh b/src/launch.sh index 467bd26..1bec502 100644 --- a/src/launch.sh +++ b/src/launch.sh @@ -5,7 +5,8 @@ EXIT_STATUS=0 TMPDIR=${TMPDIR:-/tmp} failed() { - zenity --error --text="The program appears to not have closed correctly. Please check output.log to see details." + ERROR_TEXT="The program appears to not have closed correctly. Please check output.log to see details." + zenity --error --text="$ERROR_TEXT" || echo "$ERROR_TEXT" EXIT_STATUS=1 } @@ -13,12 +14,13 @@ run_game() { PAYLOAD_LINE="$(awk '/^__PAYLOAD_BEGINS__/ { print NR + 1; exit 0; }' "$0")" || return 1 tail -n +"${PAYLOAD_LINE}" "$0" | xz -d > "$TMPFILE" || return 1 chmod +x "$TMPFILE" || return 1 - DYLD_LIBRARY_PATH=libs/ LD_LIBARY_PATH=libs/ "$TMPFILE" > output.log 2>&1 || return 1 + DYLD_LIBRARY_PATH=libs/ LD_LIBRARY_PATH=libs/ "$TMPFILE" > output.log 2>&1 || return 1 return 0 } cd "$(dirname "$0")" || exit 1 -trap '{ rm -rf "$TMPFILE"; }' EXIT +trap '{ rm -rf "$TMPFILE"; }' EXIT HUP INT QUIT TERM PWR + if ! TMPFILE="./$(mktemp .Pong-XXXXXX)"; then echo "Can't extract Pong binary to current directory. Trying $TMPDIR" -- cgit 1.4.1-2-gfad0