Fixes Inkscape detection under MSYS2, #4469
This commit is contained in:
@@ -20,9 +20,16 @@ mkdir "$tmpDir" || exit 1
|
|||||||
outDir="$tmpDir"
|
outDir="$tmpDir"
|
||||||
|
|
||||||
# Abort if Inkscape is not installed:
|
# Abort if Inkscape is not installed:
|
||||||
if ! command -v inkscape >/dev/null; then
|
if [[ ${OSTYPE^^} = "MSYS" ]]; then
|
||||||
printf '%s\n' "Inkscape does not appear to be installed. Aborting."
|
if ! command -v "/c/Program Files/Inkscape/inkscape.exe" >/dev/null; then
|
||||||
exit 1
|
printf '%s\n' "Inkscape does not appear to be installed. Aborting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if ! command -v inkscape >/dev/null; then
|
||||||
|
printf '%s\n' "Inkscape does not appear to be installed. Aborting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Command-line arguments:
|
# Command-line arguments:
|
||||||
@@ -112,7 +119,7 @@ convertSvg() {
|
|||||||
--skip-if-larger \
|
--skip-if-larger \
|
||||||
"$1"
|
"$1"
|
||||||
sizeAfter=$(wc -c < "$1")
|
sizeAfter=$(wc -c < "$1")
|
||||||
printf 'Filesize fefore: %s After: %s Difference: %s\n' "$sizeBefore" "$sizeAfter" "$((sizeBefore - sizeAfter))"
|
printf 'Filesize before: %s After: %s Difference: %s\n' "$sizeBefore" "$sizeAfter" "$((sizeBefore - sizeAfter))"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user