fixed path extraction for multiple paths

master
Martin Scheidt 2022-03-09 16:22:18 +01:00
parent c317a8dc0c
commit 8f7ecbc04b
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ check_imagemagick_policy() {
check_sudo
POLICY_PATH=$(identify -list policy | grep "Path" | cut -d " " -f2) # default /etc/ImageMagick-*/policy.xml
POLICY_PATH=$(convert -list policy | grep "Path" | awk "NR==1" | cut -d " " -f2) # default /etc/ImageMagick-*/policy.xml
if [ "$POLICY_PATH" = "[built-in]" ]; then
VERSION=$(convert --version | grep "Version" | cut -d " " -f3 | cut -d "." -f1 )
POLICY_PATH="/etc/ImageMagick-${VERSION}/policy.xml"