Inkscape 1.0's --export-file option changed to --export-filename.
Post beta change?
Also removed the -n check since it will always be true?
Post beta change?
Also removed the -n check since it will always be true?
by roundabout, Tuesday, 21 July 2020, 05:11:36 (1595308296), pushed by roundabout, Sunday, 11 May 2025, 13:22:54 (1746969774)
Author identity: Brent Lintner <brent.lintner@gmail.com>
cddfe822878782999e21e363de94b62083534dbd
INKSCAPE="$(command -v inkscape)" || true
OPTIPNG="$(command -v optipng)" || true
if "$INKSCAPE" --help | grep -e "--export-png" > /dev/null; then
EXPORT_FILE_OPTION="--export-png"
else
if "$INKSCAPE" --help | grep -e "--export-filename" > /dev/null; then
EXPORT_FILE_OPTION="--export-filename"
elif "$INKSCAPE" --help | grep -e "--export-file" > /dev/null; then
EXPORT_FILE_OPTION="--export-file"
elif "$INKSCAPE" --help | grep -e "--export-png" > /dev/null; then
EXPORT_FILE_OPTION="--export-png"
fi
i="$1"
--zoom ${ZOOM} \
"$SRC_FILE" "$ASSETS_DIR/$i.png"
else
if "$INKSCAPE" --help | grep -e "--export-png" > /dev/null; then
EXPORT_FILE_OPTION="--export-png"
else
if "$INKSCAPE" --help | grep -e "--export-filename" > /dev/null; then
EXPORT_FILE_OPTION="--export-filename"
elif "$INKSCAPE" --help | grep -e "--export-file" > /dev/null; then
EXPORT_FILE_OPTION="--export-file"
elif "$INKSCAPE" --help | grep -e "--export-png" > /dev/null; then
EXPORT_FILE_OPTION="--export-png"
fi
"$INKSCAPE" --export-id="$i" \
--export-id-only \
--export-dpi=${DPI} \
INKSCAPE="$(command -v inkscape)" || true
OPTIPNG="$(command -v optipng)" || true
if [ -n "$INKSCAPE" ] ; then
if "$INKSCAPE" --help | grep -e "--export-png" > /dev/null; then
EXPORT_FILE_OPTION="--export-png"
else
EXPORT_FILE_OPTION="--export-file"
fi
if "$INKSCAPE" --help | grep -e "--export-filename" > /dev/null; then
EXPORT_FILE_OPTION="--export-filename"
elif "$INKSCAPE" --help | grep -e "--export-file" > /dev/null; then
EXPORT_FILE_OPTION="--export-file"
elif "$INKSCAPE" --help | grep -e "--export-png" > /dev/null; then
EXPORT_FILE_OPTION="--export-png"
fi
SRC_FILE="assets.svg"