From d26ad8f97c37987fc919a3c156538b3671a0ef1d Mon Sep 17 00:00:00 2001 From: Matt Jolly Date: Sun, 20 Oct 2024 10:39:43 +1000 Subject: [PATCH] Use magick instead of convert if available This suppresses a warning on more modern systems while preserving the ability of older systems and CI/CD to run the test suite. > WARNING: The convert command is deprecated in IMv7, \ > use "magick" instead of "convert" or "magick convert" Signed-off-by: Matt Jolly --- test/html/driver.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/html/driver.sh b/test/html/driver.sh index 08bdb13e..3a950978 100755 --- a/test/html/driver.sh +++ b/test/html/driver.sh @@ -19,6 +19,11 @@ if [ ! -e $DILLOBIN ]; then exit 1 fi +magick_bin="convert" +if command -v magick 2>&1 >/dev/null; then + magick_bin="magick" +fi + function render_page() { htmlfile="$1" outpic="$2" @@ -35,7 +40,7 @@ function render_page() { echo "cannot find Dillo window" >&2 exit 1 fi - xwd -id "$winid" -silent | convert xwd:- png:${outpic} + xwd -id "$winid" -silent | ${magick_bin} xwd:- png:${outpic} kill "$dillopid" }