From 4c4d9d895a3cc502ce68f07022e1c4c28a703920 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Tue, 2 Jan 2024 16:37:09 +0100 Subject: Quick fix to showKingdom.sh --- games/dominion/showKingdom.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'games') diff --git a/games/dominion/showKingdom.sh b/games/dominion/showKingdom.sh index dd4b3a2..d5aa7cb 100755 --- a/games/dominion/showKingdom.sh +++ b/games/dominion/showKingdom.sh @@ -28,6 +28,7 @@ fi PRINT_SELECTION='' OUTPUT_AS_IMAGE='' TMP_IMAGE='showKingdom.jpg' +type 'sxiv' >/dev/null 2>&1 || OUTPUT_AS_IMAGE='y' # Process options while getopts 'oi' opt; do @@ -61,11 +62,12 @@ while read -r card; do done | if [ -n "$OUTPUT_AS_IMAGE" ]; then oldIFS="$IFS" - IFS=$'\n' + IFS="$(printf '\n.')" + IFS="${IFS%.}" montage $(cat -) -tile '5x' -mode 'concatenate' -background 'black' "$TMP_IMAGE" magick "$TMP_IMAGE" -trim "$TMP_IMAGE" sxiv "$TMP_IMAGE" || termux-open "$TMP_IMAGE" - rm "$TMP_IMAGE" + #rm "$TMP_IMAGE" # Problems on phone IFS="$oldIFS" elif [ -n "$PRINT_SELECTION" ]; then sxiv -iotb | sed 's|^/.*/||;s|_| |g;s|.jpg$||' -- cgit v1.2.1