diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2024-01-02 16:37:09 +0100 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2024-01-02 17:05:26 +0100 |
commit | 4c4d9d895a3cc502ce68f07022e1c4c28a703920 (patch) | |
tree | d6f4857c17e0cf4c52e702cc727e1b692764444a | |
parent | f2c745de664f8cc0592a66b0663bb2869e7f1467 (diff) | |
download | scripts-4c4d9d895a3cc502ce68f07022e1c4c28a703920.tar.gz scripts-4c4d9d895a3cc502ce68f07022e1c4c28a703920.zip |
Quick fix to showKingdom.sh
-rwxr-xr-x | games/dominion/showKingdom.sh | 6 |
1 files changed, 4 insertions, 2 deletions
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$||' |