aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatt Jolly <kangie@gentoo.org>2024-10-20 10:39:43 +1000
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-11-13 18:31:57 +0100
commitd26ad8f97c37987fc919a3c156538b3671a0ef1d (patch)
treefacd06209c0469add3f73a42d50348365222bdd7 /test
parent3af05307417fcbf17fdb208e578b6035a7b6ad02 (diff)
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 <kangie@gentoo.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/html/driver.sh7
1 files changed, 6 insertions, 1 deletions
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"
}