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