Skip to content

Commit f6e9710

Browse files
committed
use magick instead of convert if available
1 parent 10ec06f commit f6e9710

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/html/driver.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ if [ ! -e $DILLOBIN ]; then
1919
exit 1
2020
fi
2121

22+
magick_bin="convert"
23+
if command -v magick 2>&1 >/dev/null; then
24+
magick_bin="magick"
25+
fi
26+
2227
function render_page() {
2328
htmlfile="$1"
2429
outpic="$2"
@@ -35,7 +40,7 @@ function render_page() {
3540
echo "cannot find Dillo window" >&2
3641
exit 1
3742
fi
38-
xwd -id "$winid" -silent | convert xwd:- png:${outpic}
43+
xwd -id "$winid" -silent | ${magick_bin} xwd:- png:${outpic}
3944

4045
kill "$dillopid"
4146
}

0 commit comments

Comments
 (0)