From ca5ff301070752a002dff8a1732ee5cbbfcc001e Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 3 Sep 2002 17:23:33 +0000 Subject: [PATCH] Fix warning when using test with non-integer arguments. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5199 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ChangeLog | 5 +++++ lib/scripts/lyxpreview2ppm.sh | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index cb22810d9d..95510a8ccb 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2002-09-03 Angus Leeming + + * scripts/lyxpreview2ppm.sh: test expects integer arguments. + ${RESOLUTION} may be a float. Truncate it. + 2002-09-03 Dekel Tsur * lyx2lyx/lyxconvert_218.py (update_tabular): Prevent changing diff --git a/lib/scripts/lyxpreview2ppm.sh b/lib/scripts/lyxpreview2ppm.sh index 3ad5144178..0e0f1710be 100644 --- a/lib/scripts/lyxpreview2ppm.sh +++ b/lib/scripts/lyxpreview2ppm.sh @@ -128,8 +128,12 @@ fi # PostScript -> Bitmap files # Older versions of gs have problems with a large degree of anti-aliasing # at high resolutions + +# test expects integer arguments. ${RESOLUTION} may be a float. Truncate it. +INT_RESOLUTION=`echo "${RESOLUTION} / 1" | bc` + ALPHA=4 -if [ ${RESOLUTION} -gt 150 ]; then +if [ ${INT_RESOLUTION} -gt 150 ]; then ALPHA=2 fi -- 2.39.5